LSsession :: loadLSobject() : Added support to LSaddons dependencies.
authorbn8 <bn8@zionetrix.net>
Fri, 5 Mar 2010 16:44:07 +0000 (17:44 +0100)
committerbn8 <bn8@zionetrix.net>
Fri, 5 Mar 2010 16:44:07 +0000 (17:44 +0100)
public_html/includes/class/class.LSsession.php

index bc527d3..20793dd 100644 (file)
@@ -241,6 +241,20 @@ class LSsession {
       if (!LSconfig :: set("LSobjects.$object",$GLOBALS['LSobjects'][$object])) {
         $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) {
       LSerror :: addErrorCode('LSsession_04',$object);