// Merge -> revision 8984
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8988 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -1427,46 +1427,9 @@ $this->standalone = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->apacheModExists('evasive'))
|
||||
if (Tools::apacheModExists('evasive'))
|
||||
sleep(1);
|
||||
}
|
||||
/**
|
||||
* apacheModExists return true if the apache module $name is loaded
|
||||
* @TODO move this method in class Information (when it will exist)
|
||||
*
|
||||
* @param string $name module name
|
||||
* @return boolean true if exists
|
||||
*/
|
||||
function apacheModExists($name)
|
||||
{
|
||||
if(function_exists('apache_get_modules'))
|
||||
{
|
||||
static $apacheModuleList = null;
|
||||
|
||||
if (!is_array($apacheModuleList))
|
||||
$apacheModuleList = apache_get_modules();
|
||||
|
||||
// we need strpos (example can be evasive20
|
||||
foreach($apacheModuleList as $module)
|
||||
{
|
||||
if (strpos($module, $name)!==false)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else{
|
||||
// If apache_get_modules does not exists,
|
||||
// one solution should be parsing httpd.conf,
|
||||
// but we could simple parse phpinfo(INFO_MODULES) return string
|
||||
ob_start();
|
||||
phpinfo(INFO_MODULES);
|
||||
$phpinfo = ob_get_contents();
|
||||
ob_end_clean();
|
||||
if (strpos($phpinfo, $module) !== false)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function _getJsErrorMsgs()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user