[Piwik-svn] r500 - trunk/modules
svnmaster at piwik.org
svnmaster at piwik.org
Thu May 29 05:34:41 CEST 2008
Author: matt
Date: 2008-05-29 05:34:40 +0200 (Thu, 29 May 2008)
New Revision: 500
Modified:
trunk/modules/Piwik.php
Log:
- now trying to set the memory limit (bis)
Modified: trunk/modules/Piwik.php
===================================================================
--- trunk/modules/Piwik.php 2008-05-29 03:30:45 UTC (rev 499)
+++ trunk/modules/Piwik.php 2008-05-29 03:34:40 UTC (rev 500)
@@ -148,7 +148,9 @@
static public function raiseMemoryLimitIfNecessary()
{
$minimumMemoryLimit = Zend_Registry::get('config')->General->minimumMemoryLimit;
- if(self::getMemoryLimitValue() < $minimumMemoryLimit)
+ $memoryLimit = self::getMemoryLimitValue();
+ if($memoryLimit === false
+ || $memoryLimit < $minimumMemoryLimit)
{
return self::setMemoryLimit($minimumMemoryLimit);
}
@@ -710,14 +712,33 @@
}
return $class;
}
+
+ /**
+ * Returns the current module read from the URL (eg. 'API', 'UserSettings', etc.)
+ *
+ * @return string
+ */
+ static public function getModule()
+ {
+ return Piwik_Common::getRequestVar('module', '', 'string');
+ }
+ /**
+ * Returns the current action read from the URL
+ *
+ * @return string
+ */
+ static public function getAction()
+ {
+ return Piwik_Common::getRequestVar('action', '', 'string');
+ }
/**
* returns false if the URL to redirect to is already this URL
*/
static public function redirectToModule( $newModule, $newAction = '' )
{
- $currentModule = Piwik_Common::getRequestVar('module', '', 'string');
- $currentAction = Piwik_Common::getRequestVar('action', '', 'string');
+ $currentModule = self::getModule();
+ $currentAction = self::getAction();
if($currentModule != $newModule
|| $currentAction != $newAction )
More information about the Piwik-svn
mailing list