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

Merge remote-tracking branch 'origin/3.7' into 3.8

Conflicts:
	htdocs/core/class/ldap.class.php
	htdocs/langs/en_US/admin.lang
parents d9553212 acc8cca8
Branches
No related tags found
No related merge requests found
...@@ -160,13 +160,15 @@ class Ldap ...@@ -160,13 +160,15 @@ class Ldap
return -1; return -1;
} }
if (! function_exists('ldap_connect')) if (! function_exists("ldap_connect"))
{ {
$this->error='Your PHP need extension ldap'; $this->error='LDAPFunctionsNotAvailableOnPHP';
dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING); dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING);
return -1; $return=-1;
} }
if (empty($this->error))
{
// Loop on each ldap server // Loop on each ldap server
foreach ($this->server as $key => $host) foreach ($this->server as $key => $host)
{ {
...@@ -244,6 +246,7 @@ class Ldap ...@@ -244,6 +246,7 @@ class Ldap
if (! $connected) $this->close(); if (! $connected) $this->close();
} }
}
if ($connected) if ($connected)
{ {
......
...@@ -746,17 +746,24 @@ function activateModule($value,$withdeps=1) ...@@ -746,17 +746,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))
......
...@@ -1690,3 +1690,4 @@ MailToSendSupplierRequestForQuotation=To send quotation request to supplier ...@@ -1690,3 +1690,4 @@ MailToSendSupplierRequestForQuotation=To send quotation request to supplier
MailToSendSupplierOrder=To send supplier order MailToSendSupplierOrder=To send supplier order
MailToSendSupplierInvoice=To send supplier invoice MailToSendSupplierInvoice=To send supplier invoice
MailToThirdparty=To send email from thirdparty page MailToThirdparty=To send email from thirdparty page
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment