Skip to content
Extraits de code Groupes Projets
Valider 20a13ff2 rédigé par robocoder's avatar robocoder
Parcourir les fichiers

replace Zend_Loader::isReadable() with simple is_readable() since paths are...

replace Zend_Loader::isReadable() with simple is_readable() since paths are absolute; reduce core dependencies on Zend_Loader

git-svn-id: http://dev.piwik.org/svn/trunk@2117 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent 21041c25
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -232,7 +232,7 @@ class Piwik_API_Proxy
$module = self::getModuleNameFromClassName($fileName);
$path = PIWIK_INCLUDE_PATH . '/plugins/' . $module . '/API.php';
if(Zend_Loader::isReadable($path))
if(is_readable($path))
{
require_once $path; // prefixed by PIWIK_INCLUDE_PATH
}
......
......@@ -106,7 +106,7 @@ class Piwik_Config
public function init()
{
$this->defaultConfig = new Piwik_Config_Ini($this->pathIniFileDefaultConfig, null, true);
if(!Zend_Loader::isReadable($this->pathIniFileUserConfig))
if(!is_readable($this->pathIniFileUserConfig))
{
throw new Exception("The configuration file {$this->pathIniFileUserConfig} has not been found.");
}
......
......@@ -108,7 +108,7 @@ class Piwik_FrontController
if(!class_exists($controllerClassName, false))
{
$moduleController = PIWIK_INCLUDE_PATH . '/plugins/' . $module . '/Controller.php';
if( !Zend_Loader::isReadable($moduleController))
if(!is_readable($moduleController))
{
throw new Exception("Module controller $moduleController not found!");
}
......
......@@ -61,7 +61,6 @@ abstract class Piwik_Log extends Zend_Log
function addWriteToNull()
{
Zend_Loader::loadClass('Zend_Log_Writer_Null');
$this->addWriter( new Zend_Log_Writer_Null );
}
......
......@@ -398,8 +398,8 @@ class Piwik_PluginsManager
*/
private function loadTranslation( $plugin, $langCode )
{
// we are certainly in Tracker mode, Zend is not loaded
if(!class_exists('Zend_Loader', false))
// we are in Tracker mode if Piwik_Loader is not (yet) loaded
if(!class_exists('Piwik_Loader', false))
{
return ;
}
......
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