Code

Updated system Management to avoid initializing unknown plugins.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 17 Jun 2008 08:52:59 +0000 (08:52 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 17 Jun 2008 08:52:59 +0000 (08:52 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11344 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_divListSystem.inc
gosa-plugins/systems/admin/systems/class_systemManagement.inc
gosa-plugins/systems/admin/systems/class_termDNS.inc

index 9385b940e387e566c6f4829685980e5fb280cca8..e67915fb91f2807bc2bf76a7a43a433de2fb98c9 100644 (file)
@@ -240,18 +240,20 @@ class divListSystem extends MultiSelectWindow
         "&nbsp;"._("Component")."|"."newsystem_component|\n";
     }
 
-    $events  = DaemonEvent::get_event_types(SYSTEM_EVENT);
+    if($this->parent->si_active){
+      $events  = DaemonEvent::get_event_types(SYSTEM_EVENT);
 
-    $s.= "..|<img src='images/rocket.png' alt='' border='0' class='center'>".
-      "&nbsp;"._("Trigger action")."|\n";
-    foreach($events['TRIGGERED'] as $name => $event){
-      $s.= "...|".$event['MenuImage']."&nbsp;".$event['s_Menu_Name']."|trigger_event_".$name."\n";
-    }
+      $s.= "..|<img src='images/rocket.png' alt='' border='0' class='center'>".
+        "&nbsp;"._("Trigger action")."|\n";
+      foreach($events['TRIGGERED'] as $name => $event){
+        $s.= "...|".$event['MenuImage']."&nbsp;".$event['s_Menu_Name']."|trigger_event_".$name."\n";
+      }
 
-    $s.= "..|<img src='images/clock.png' alt='' border='0' class='center'>".
-      "&nbsp;"._("Schedule action")."|\n";
-    foreach($events['SCHEDULED'] as $name =>  $event){
-      $s.= "...|".$event['MenuImage']."&nbsp;".$event['s_Menu_Name']."|schedule_event_".$name."\n";
+      $s.= "..|<img src='images/clock.png' alt='' border='0' class='center'>".
+        "&nbsp;"._("Schedule action")."|\n";
+      foreach($events['SCHEDULED'] as $name =>  $event){
+        $s.= "...|".$event['MenuImage']."&nbsp;".$event['s_Menu_Name']."|schedule_event_".$name."\n";
+      }
     }
 
     $s.= "..|<img src='images/lists/trash.png' alt='' border='0' class='center'>".
index 8dee77f84b9be66e91940a18b02ff687ad5fc042..663785a5424127a0786f48cb6b89cd7a81480fd2 100644 (file)
@@ -43,6 +43,7 @@ class systems extends plugin
 
   var $system_activation_object = ""; // The object to activate (NewDevice)
   var $fai_activated  = FALSE;
+  var $si_active      = FALSE;
 
   var $acl_module = array("incoming","terminal","workstation","server","printer","phone","winworkstation","component");
 
@@ -70,6 +71,13 @@ class systems extends plugin
     if($this->config->search("ArpNewDevice","CLASS",array('tabs')) != ""){
       $this->arp_handling_active = TRUE;
     }
+
+    /* Check if we are able to communicate with the GOsa supprot daemon 
+     */
+    if(class_available("gosaSupportDaemon")){
+      $o = new gosaSupportDaemon();
+      $this->si_active = $o->connect();
+    }
   }
 
 
index ec310e64ea433aeab2b2162af680136180b71147..d5249a25d1d6d6b8ef3d2ff5f2b0a3ad6dafa51d 100644 (file)
@@ -127,6 +127,11 @@ class termDNS extends plugin
         $this->DNSenabled = true;
       }
     }
+
+    if(!class_available("DNS")){
+      $this->DNSenabled = FALSE;
+    }
+  
     if(!$this->DNSenabled){
       $this->DNS_is_account = false;
       return;