Skip to content
Snippets Groups Projects
Commit acc8cca8 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #5290 from atm-ph/fix_3.7_issue_2777

Fix #2777
parents 1552e7f4 a62f5bd5
No related branches found
No related tags found
No related merge requests found
......@@ -732,17 +732,24 @@ function activateModule($value,$withdeps=1)
if (isset($objMod->depends) && is_array($objMod->depends) && ! empty($objMod->depends))
{
// Activation des modules dont le module depend
$TError=array();
$num = count($objMod->depends);
for ($i = 0; $i < $num; $i++)
{
$activate = false;
foreach ($modulesdir as $dir)
{
if (file_exists($dir.$objMod->depends[$i].".class.php"))
{
activateModule($objMod->depends[$i]);
$activate = true;
}
}
if (!$activate) $TError[] = $langs->trans('activateModuleDependNotSatisfied', $objMod->name, $objMod->depends[$i]);
}
setEventMessages('', $TError, 'errors');
}
if (isset($objMod->conflictwith) && is_array($objMod->conflictwith) && ! empty($objMod->conflictwith))
......
......@@ -1563,3 +1563,4 @@ TypePaymentDesc=0:Customer payment type, 1:Supplier payment type, 2:Both custome
IncludePath=Include path (defined into variable %s)
NoModueToManageStockDecrease=No module able to manage automatic stock decrease has been activated. Stock decrease will be done on manual input only.
NoModueToManageStockIncrease=No module able to manage automatic stock increase has been activated. Stock increase will be done on manual input only.
activateModuleDependNotSatisfied=Module "%s" depends on module "%s" that is missing, so module "%1$s" may not work correclty. Please install module "%2$s" or disable module "%1$s" if you want to be safe from any surprise
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment