From 0906c1cca96264e61626f498d165b87768fcce92 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 17 Jun 2008 08:52:59 +0000 Subject: [PATCH] Updated system Management to avoid initializing unknown plugins. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11344 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_divListSystem.inc | 22 ++++++++++--------- .../admin/systems/class_systemManagement.inc | 8 +++++++ .../systems/admin/systems/class_termDNS.inc | 5 +++++ 3 files changed, 25 insertions(+), 10 deletions(-) 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; -- 2.30.2