Code

Updated pluglist
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 8 Jul 2008 11:55:28 +0000 (11:55 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 8 Jul 2008 11:55:28 +0000 (11:55 +0000)
-Recreate menu list, if class_location.inc has changed.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11556 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_pluglist.inc

index 8c47f218a97be8d9c53e26e529363e69a9588056..3d892c8e355d816a37106be2ed143e6c4f815fee 100644 (file)
@@ -142,6 +142,19 @@ class pluglist {
 
        function gen_menu()
        {
+    /* Check if class_location.inc has changed, this is the case 
+        if we have installed or removed plugins. 
+     */
+    if(!session::is_set("class_location.inc:timestamp")){
+      $tmp = stat("../include/class_location.inc");
+      session::set("class_location.inc:timestamp",$tmp['mtime']);
+    }else{
+      $tmp = stat("../include/class_location.inc");
+      if($tmp['mtime'] != session::get("class_location.inc:timestamp")){
+        $this->menu = "";
+      }
+    }
+
                if ($this->menu == ""){
                        $first= TRUE;
                        $cfg= $this->config->data['MENU'];