[-] BO : Remove warning with open_basdir on module list

This commit is contained in:
gRoussac committed 2013-11-21 14:17:55 +01:00
1 parent 914f613e7b
commit 3ab28374e6
1 file changed
+3 -1
+3 -1
View File
@@ -1258,7 +1258,9 @@ abstract class ModuleCore
$modules = scandir(_PS_MODULE_DIR_); $modules = scandir(_PS_MODULE_DIR_);
foreach ($modules as $name) foreach ($modules as $name)
{ {
if (is_dir(_PS_MODULE_DIR_.$name.DIRECTORY_SEPARATOR) && Tools::file_exists_cache(_PS_MODULE_DIR_.$name.'/'.$name.'.php')) if (is_file(_PS_MODULE_DIR_.$name))
continue;
elseif (is_dir(_PS_MODULE_DIR_.$name.DIRECTORY_SEPARATOR) && Tools::file_exists_cache(_PS_MODULE_DIR_.$name.'/'.$name.'.php'))
{ {
if (!Validate::isModuleName($name)) if (!Validate::isModuleName($name))
throw new PrestaShopException(sprintf('Module %s is not a valid module name', $name)); throw new PrestaShopException(sprintf('Module %s is not a valid module name', $name));