Fix: Works with PHP 5.2

This commit is contained in:
Laurent Destailleur 2012-10-22 00:43:59 +02:00
parent 31779cdbd1
commit d56791d4dc
6 changed files with 8 additions and 12 deletions

View File

@ -60,8 +60,8 @@ if (is_dir($dir))
$module = new $file;
// Show modules according to features level
if ($module->getVersion() == $module::DEVELOPMENT && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
if ($module->getVersion() == $module::EXPERIMENTAL && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
if ($module->getVersion() == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
if ($module->getVersion() == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
$syslogModules[] = $file;
}

View File

@ -7,10 +7,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandlerInterface.php';
*/
class LogHandler
{
const STABLE = 'stable';
const DEVELOPMENT = 'development';
const EXPERIMENTAL = 'experimental';
/**
* Content of the info tooltip.
*
@ -22,13 +18,13 @@ class LogHandler
}
/**
* Version of the module
* Version of the module ('x.y.z' or 'dolibarr' or 'experimental' or 'development')
*
* @return string
*/
public function getVersion()
{
return self::EXPERIMENTAL;
return 'development';
}
/**

View File

@ -17,7 +17,7 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
*/
public function getVersion()
{
return self::STABLE;
return 'dolibarr';
}
/**

View File

@ -19,7 +19,7 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
*/
public function getVersion()
{
return self::STABLE;
return 'dolibarr';
}
/**

View File

@ -17,7 +17,7 @@ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface
*/
public function getVersion()
{
return self::STABLE;
return 'dolibarr';
}
/**

View File

@ -17,7 +17,7 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
*/
public function getVersion()
{
return self::STABLE;
return 'dolibarr';
}
/**