From: hickert Date: Tue, 17 Jun 2008 08:52:59 +0000 (+0000) Subject: Updated system Management to avoid initializing unknown plugins. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0906c1cca96264e61626f498d165b87768fcce92;p=gosa.git Updated system Management to avoid initializing unknown plugins. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11344 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/systems/admin/systems/class_divListSystem.inc b/gosa-plugins/systems/admin/systems/class_divListSystem.inc index 9385b940e..e67915fb9 100644 --- a/gosa-plugins/systems/admin/systems/class_divListSystem.inc +++ b/gosa-plugins/systems/admin/systems/class_divListSystem.inc @@ -240,18 +240,20 @@ class divListSystem extends MultiSelectWindow " "._("Component")."|"."newsystem_component|\n"; } - $events = DaemonEvent::get_event_types(SYSTEM_EVENT); + if($this->parent->si_active){ + $events = DaemonEvent::get_event_types(SYSTEM_EVENT); - $s.= "..|". - " "._("Trigger action")."|\n"; - foreach($events['TRIGGERED'] as $name => $event){ - $s.= "...|".$event['MenuImage']." ".$event['s_Menu_Name']."|trigger_event_".$name."\n"; - } + $s.= "..|". + " "._("Trigger action")."|\n"; + foreach($events['TRIGGERED'] as $name => $event){ + $s.= "...|".$event['MenuImage']." ".$event['s_Menu_Name']."|trigger_event_".$name."\n"; + } - $s.= "..|". - " "._("Schedule action")."|\n"; - foreach($events['SCHEDULED'] as $name => $event){ - $s.= "...|".$event['MenuImage']." ".$event['s_Menu_Name']."|schedule_event_".$name."\n"; + $s.= "..|". + " "._("Schedule action")."|\n"; + foreach($events['SCHEDULED'] as $name => $event){ + $s.= "...|".$event['MenuImage']." ".$event['s_Menu_Name']."|schedule_event_".$name."\n"; + } } $s.= "..|". diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index 8dee77f84..663785a54 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -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(); + } } diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc index ec310e64e..d5249a25d 100644 --- a/gosa-plugins/systems/admin/systems/class_termDNS.inc +++ b/gosa-plugins/systems/admin/systems/class_termDNS.inc @@ -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;