Code

Udpated dhcp check in sertm generic.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Oct 2007 11:41:40 +0000 (11:41 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Oct 2007 11:41:40 +0000 (11:41 +0000)
Used config->search instead of foreach(this->config..

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

plugins/admin/systems/class_termDNS.inc

index 9b067c0f7bd8aea175ff92b62e3f8c660dbac780..609074146673fcb85d8dee9b4eb713e4e3e1d750 100644 (file)
@@ -65,10 +65,8 @@ class termDNS extends plugin
 
     /* Hide all dhcp specific code, if dhcp plugin is not present in config */
     $dhcpEnabled = FALSE;
-    foreach($this->config->data['TABS']['SERVTABS'] as $tab){
-      if(preg_match("/^servdhcp$/",$tab['CLASS'])){
-        $this->dhcpEnabled = TRUE;
-      }
+    if($this->config->search("servdhcp","class",array("tabs"))){
+      $this->dhcpEnabled = TRUE;
     }
     if($this->dhcpEnabled){
       $this->dhcpParentNodes = $this->get_dhcp_parent_nodes();