LSsession :: loadLSobject() : Added support to LSaddons dependencies.

This commit is contained in:
Benjamin Renard 2010-03-05 17:44:07 +01:00
parent 47c10a169c
commit 159b33a49f

View file

@ -241,6 +241,20 @@ class LSsession {
if (!LSconfig :: set("LSobjects.$object",$GLOBALS['LSobjects'][$object])) { if (!LSconfig :: set("LSobjects.$object",$GLOBALS['LSobjects'][$object])) {
$error = 1; $error = 1;
} }
else if (isset($GLOBALS['LSobjects'][$object]['LSaddons'])){
if (is_array($GLOBALS['LSobjects'][$object]['LSaddons'])) {
foreach ($GLOBALS['LSobjects'][$object]['LSaddons'] as $addon) {
if (!self :: loadLSaddon($addon)) {
$error = 1;
}
}
}
else {
if (!self :: loadLSaddon($GLOBALS['LSobjects'][$object]['LSaddons'])) {
$error = 1;
}
}
}
} }
if ($error) { if ($error) {
LSerror :: addErrorCode('LSsession_04',$object); LSerror :: addErrorCode('LSsession_04',$object);