Fix #2777
This commit is contained in:
parent
1552e7f41f
commit
a62f5bd5b4
@ -732,17 +732,24 @@ function activateModule($value,$withdeps=1)
|
|||||||
if (isset($objMod->depends) && is_array($objMod->depends) && ! empty($objMod->depends))
|
if (isset($objMod->depends) && is_array($objMod->depends) && ! empty($objMod->depends))
|
||||||
{
|
{
|
||||||
// Activation des modules dont le module depend
|
// Activation des modules dont le module depend
|
||||||
|
$TError=array();
|
||||||
$num = count($objMod->depends);
|
$num = count($objMod->depends);
|
||||||
for ($i = 0; $i < $num; $i++)
|
for ($i = 0; $i < $num; $i++)
|
||||||
{
|
{
|
||||||
|
$activate = false;
|
||||||
foreach ($modulesdir as $dir)
|
foreach ($modulesdir as $dir)
|
||||||
{
|
{
|
||||||
if (file_exists($dir.$objMod->depends[$i].".class.php"))
|
if (file_exists($dir.$objMod->depends[$i].".class.php"))
|
||||||
{
|
{
|
||||||
activateModule($objMod->depends[$i]);
|
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))
|
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)
|
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.
|
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.
|
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
|
||||||
Loading…
Reference in New Issue
Block a user