LSsession: improve loadLSaddons() method

This commit is contained in:
Benjamin Renard 2020-11-17 17:56:04 +01:00
parent 56ffbd7a71
commit 8b996885d1

View file

@ -557,12 +557,11 @@ class LSsession {
} }
/** /**
* Chargement des addons LdapSaisie * Load globally required LSaddons
* *
* Chargement des LSaddons contenue dans la variable * Load LSaddons list in $GLOBALS['LSaddons']['loads']
* $GLOBALS['LSaddons']['loads']
* *
* @retval boolean true si le chargement a réussi, false sinon. * @retval boolean True on success, False otherwise
*/ */
public static function loadLSaddons() { public static function loadLSaddons() {
$conf = LSconfig :: get('LSaddons.loads'); $conf = LSconfig :: get('LSaddons.loads');
@ -571,10 +570,12 @@ class LSsession {
return; return;
} }
$error = false;
foreach ($conf as $addon) { foreach ($conf as $addon) {
self :: loadLSaddon($addon); if (!self :: loadLSaddon($addon))
$false = true;
} }
return true; return !$error;
} }