Skip to content
Extraits de code Groupes Projets
Valider b95d4dd6 rédigé par mattpiwik's avatar mattpiwik
Parcourir les fichiers

Fixes #2655

git-svn-id: http://dev.piwik.org/svn/trunk@5156 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent a30625d9
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -140,6 +140,9 @@ minimum_pgsql_version = 8.3 ...@@ -140,6 +140,9 @@ minimum_pgsql_version = 8.3
; Minimum adviced memory limit in php.ini file (see memory_limit value) ; Minimum adviced memory limit in php.ini file (see memory_limit value)
minimum_memory_limit = 128 minimum_memory_limit = 128
; Minimum memory limit enforced when archived via misc/cron/archive.php
minimum_memory_limit_when_archiving = 768
; Piwik will check that usernames and password have a minimum length, and will check that characters are "allowed" ; Piwik will check that usernames and password have a minimum length, and will check that characters are "allowed"
; This can be disabled, if for example you wish to import an existing User database in Piwik and your rules are less restrictive ; This can be disabled, if for example you wish to import an existing User database in Piwik and your rules are less restrictive
disable_checks_usernames_attributes = 0 disable_checks_usernames_attributes = 0
......
...@@ -968,14 +968,26 @@ class Piwik ...@@ -968,14 +968,26 @@ class Piwik
*/ */
static public function raiseMemoryLimitIfNecessary() static public function raiseMemoryLimitIfNecessary()
{ {
$minimumMemoryLimit = Zend_Registry::get('config')->General->minimum_memory_limit;
$memoryLimit = self::getMemoryLimitValue(); $memoryLimit = self::getMemoryLimitValue();
if($memoryLimit !== false if($memoryLimit === false)
&& $memoryLimit < $minimumMemoryLimit) {
return false;
}
$minimumMemoryLimit = Zend_Registry::get('config')->General->minimum_memory_limit;
if(Piwik_Common::isArchivePhpTriggered())
{
$minimumMemoryLimitWhenArchiving = Zend_Registry::get('config')->General->minimum_memory_limit_when_archiving;
if($memoryLimit < $minimumMemoryLimitWhenArchiving)
{
return self::setMemoryLimit($minimumMemoryLimitWhenArchiving);
}
return false;
}
if($memoryLimit < $minimumMemoryLimit)
{ {
return self::setMemoryLimit($minimumMemoryLimit); return self::setMemoryLimit($minimumMemoryLimit);
} }
return false; return false;
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter