Code

Replaced search_config with config->search
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 21 Sep 2007 12:53:07 +0000 (12:53 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 21 Sep 2007 12:53:07 +0000 (12:53 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7373 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_goService.inc
plugins/admin/systems/class_servGeneric.inc
plugins/admin/systems/class_servRepository.inc
plugins/admin/systems/class_servRepositorySetup.inc
plugins/admin/systems/class_systemManagement.inc
plugins/admin/systems/class_terminalGeneric.inc
plugins/admin/systems/class_terminalStartup.inc
plugins/admin/systems/class_workstationGeneric.inc
plugins/admin/systems/class_workstationStartup.inc

index 63b8850dc4ee11585353cc0a1af37f55c0a66e01..afbbf3001b5106c016f97b56cc90c10d5f403540 100644 (file)
@@ -178,9 +178,9 @@ class goService extends plugin{
   function action_hook($add_attrs= array())
   {
     /* Find postcreate entries for this class */
-    $command= search_config($this->config->data['MENU'], get_class($this), "ACTION_HOOK");
+    $command= $this->config->search(get_class($this), "ACTION_HOOK",array('menu'));
     if ($command == "" && isset($this->config->data['TABS'])){
-      $command= search_config($this->config->data['TABS'], get_class($this), "ACTION_HOOK");
+      $command= $this->config->search(get_class($this), "ACTION_HOOK",array('tabs'));
     }
 
     if ($command != ""){
index d74fb92cd08a1625a2fb7385a68359937d2b5945..54df43945a524167170c02e3564d46bac1b1843d 100644 (file)
@@ -43,7 +43,8 @@ class servgeneric extends plugin
   function servgeneric (&$config, $dn= NULL, $parent= NULL)
   {
     /* Check if FAI is activated */
-    $tmp = search_config($config->data,"faiManagement","CLASS");
+    $tmp = $config->search("faiManagement", "CLASS",array('tabs'));
+    
     if(!empty($tmp)){
       $this->fai_activated = TRUE;
     }
@@ -104,7 +105,7 @@ class servgeneric extends plugin
 
     /* Check for action */
     if (isset($_POST['action']) && $this->acl_is_writeable("FAIstate")){
-      $cmd= search_config($this->config->data['TABS'], "workgeneric", "ACTIONCMD");
+      $cmd = $this->config->search("workgeneric", "ACTIONCMD",array('tabs'));
       if ($cmd == ""){
         print_red(_("No ACTIONCMD definition found in your gosa.conf"));
       } else {
index c7fea3871796081f03e9004ec48519000ef4321a..ce5aeb07d64be2a7f9e6e367b7f82501820602f5 100644 (file)
@@ -33,7 +33,7 @@ class servrepository extends goService
     plugin::plugin ($config, $dn, $parent);
 
     /* Skip this if fai is deactivated */
-    $tmp = search_config($this->config->data,"faiManagement","CLASS");
+    $tmp= $this->config->search("faiManagement", "CLASS");
     if(!empty($tmp)){
       $this->fai_activated = TRUE;    
     }else{
index e8c51274646cc8ec96a49338bff4c9e86612f23a..40f37b0628acca88f431cc89042a7e16b31cdcf2 100644 (file)
@@ -193,7 +193,7 @@ class servRepositorySetup  extends plugin
   function GetHookElements()
   {
     $ret = array();
-    $cmd= search_config($this->config->data['TABS'], "servrepository", "REPOSITORY_HOOK");
+    $cmd = $this->config->search("servrepository", "REPOSITORY_HOOK",array('tabs'));
     if(!empty($cmd)){
       $res = shell_exec($cmd);
       $res2 = trim($res);
index ade28ad56ba421b74f2e129e9f09cb465c4b9782..8c4c5c3ccdec41f9c7d6f2bb4f6b377b9dce39fc 100644 (file)
@@ -175,7 +175,8 @@ class systems extends plugin
       $dsc             = array(0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("pipe", "w"));
 
       /* Get and check command */
-      $command= search_config($this->config->data['TABS'], "workgeneric", "ISOCMD");
+      $command= $this->config->search("workgeneric", "ISOCMD",array('tabs'));
+      
       if (check_command($command)){
         @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute");
 
@@ -956,7 +957,7 @@ class systems extends plugin
     $sys_categories   = array("terminal", "workstation", "server", "phone" ,"printer");
 
     /* Add FAIstate to attributes if FAI is activated */
-    $tmp = search_config($this->config->data,"faiManagement","CLASS");
+    $tmp = $this->config->search("faiManagement", "CLASS");
     if(!empty($tmp)){
       $sys_attrs[] = "FAIstate";
     }    
index 6b7d04b4fb9797191eb49971c061fbc62ba7bc7b..e0f05f8623b2d9d3285ff1d5ac34e3053a938e84 100644 (file)
@@ -63,7 +63,7 @@ class termgeneric extends plugin
   function termgeneric (&$config, $dn= NULL, $parent= NULL)
   {
     /* Check if FAI is activated */
-    $tmp = search_config($config->data,"faiManagement","CLASS");
+    $tmp= $config->search("faiManagement", "CLASS");
     if(!empty($tmp)){
       $this->fai_activated = TRUE;
     }
@@ -204,7 +204,8 @@ class termgeneric extends plugin
 
       switch($_POST['saction']){
         case 'wake':
-          $cmd= search_config($this->config->data['TABS'], "termgeneric", "WAKECMD");
+          $cmd= $this->config->search("termgeneric", "WAKECMD",array('tabs'));
+
           if ($cmd == ""){
             print_red(_("No WAKECMD definition found in your gosa.conf"));
           } else {
@@ -216,7 +217,7 @@ class termgeneric extends plugin
           break;
 
         case 'reboot':
-          $cmd= search_config($this->config->data['TABS'], "termgeneric", "REBOOTCMD");
+          $cmd= $this->config->search("termgeneric", "REBOOTCMD",array('tabs'));
           if ($cmd == ""){
             print_red(_("No REBOOTCMD definition found in your gosa.conf"));
           } else {
@@ -228,7 +229,7 @@ class termgeneric extends plugin
           break;
 
         case 'halt':
-          $cmd= search_config($this->config->data['TABS'], "termgeneric", "HALTCMD");
+          $cmd= $this->config->search("termgeneric", "HALTCMD",array('tabs'));
           if ($cmd == ""){
             print_red(_("No HALTCMD definition found in your gosa.conf"));
           } else {
index 8bab797f4159d3bddf6b7485a39db5fac4bc9868..9a138f218346de543382f5b1789be601fbee24eb 100644 (file)
@@ -89,7 +89,7 @@ class termstartup extends plugin
 
     /* Get list of boot kernels */
     if (isset($this->config->data['TABS'])){
-      $command= search_config($this->config->data['TABS'], get_class($this), "KERNELS");
+      $command= $this->config->search(get_class($this), "KERNELS",array('tabs'));
 
       if (!check_command($command)){
         $message[]= sprintf(_("Command '%s', specified as KERNELS hook for plugin '%s' doesn't seem to exist."), $command,
index 734a8459842e8ccf797df2f0fc2c9aca0a08cf56..ae31c93c0f4c3923c19ad2bd53a0abc31441be4c 100644 (file)
@@ -68,7 +68,7 @@ class workgeneric extends plugin
 
   function workgeneric (&$config, $dn= NULL, $parent= NULL)
   {
-    $tmp = search_config($config->data,"faiManagement","CLASS");
+    $tmp= $config->search("faiManagement", "CLASS");
     if(!empty($tmp)){
       $this->fai_activated = TRUE;
     }
@@ -181,7 +181,7 @@ class workgeneric extends plugin
     }
 
     if ((isset($_POST['action'])) && ($this->acl_is_writeable("FAIstate"))){
-      $cmd= search_config($this->config->data['TABS'], "workgeneric", "ACTIONCMD");
+      $cmd= $this->config->search("workgeneric", "ACTIONCMD",array('tabs'));
       if ($cmd == ""){
         print_red(_("No ACTIONCMD definition found in your gosa.conf"));
       } else {
index 06eb663803a19763c25f6dedef7da2b83406ed8c..3f6c1c1c713a3a67ae297cc867e861b9ea868d30 100644 (file)
@@ -61,7 +61,7 @@ class workstartup extends plugin
   function workstartup (&$config, $dn= NULL, $parent= NULL)
   {
     /* Check if FAI is active */
-    $tmp = search_config($config->data,"faiManagement","CLASS");
+    $tmp= $config->search("faiManagement", "CLASS");
     if(!empty($tmp)){
       $this->fai_activated = TRUE;
     }else{
@@ -341,7 +341,7 @@ class workstartup extends plugin
 
     /* Get list of boot kernels */
     if (isset($this->config->data['TABS'])){
-      $command= search_config($this->config->data['TABS'], get_class($this), "KERNELS");
+      $command= $this->config->search(get_class($this), "KERNELS",array('tabs'));
 
       if (!check_command($command)){
         $message[]= sprintf(_("Command '%s', specified as KERNELS hook for plugin '%s' doesn't seem to exist."), $command,
@@ -1151,7 +1151,7 @@ class workstartup extends plugin
   function GetHookElements()
   {
     $ret = array();
-    $cmd= search_config($this->config->data['TABS'], "servrepository", "REPOSITORY_HOOK");
+    $cmd= $this->config->search("servrepository", "REPOSITORY_HOOK",array('tabs'));
     if(!empty($cmd)){
       $res = shell_exec($cmd);
       $res2 = trim($res);