N°3012 - Fix blocking MTT/MTP when /extensions

This commit is contained in:
acognet
2020-06-11 14:13:27 +02:00
parent cf8a12fe95
commit 6354c62c2b

View File

@@ -1607,10 +1607,10 @@ JS
$sManualInstallModulesFullPath = APPROOT.$sExtensionsDir.DIRECTORY_SEPARATOR;
//simple test in order to prevent install iTop pro with module in extension folder
$fileInfo = scandir($sManualInstallModulesFullPath);
foreach ($fileInfo as $folder)
$aFileInfo = scandir($sManualInstallModulesFullPath);
foreach ($aFileInfo as $sFolder)
{
if ($folder != "." && $folder != ".." && is_dir($sManualInstallModulesFullPath.$folder) === true)
if ($sFolder != "." && $sFolder != ".." && is_dir($sManualInstallModulesFullPath.$sFolder) === true)
{
return "Some modules are present in the '$sExtensionsDir' directory, this is not allowed when using ".ITOP_APPLICATION;
}