From dae07ffa188483448ce17d2082061a584858c42b Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 21 Sep 2007 13:22:40 +0000 Subject: [PATCH] Replaced some search_config calls with config->search git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7375 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_divListFai.inc | 4 ++-- plugins/admin/fai/class_faiManagement.inc | 8 ++++---- plugins/admin/fai/class_faiSummaryTab.inc | 2 +- plugins/admin/groups/class_groupApplication.inc | 8 ++++---- plugins/admin/groups/class_groupGeneric.inc | 4 ++-- plugins/admin/groups/class_groupManagement.inc | 2 +- plugins/admin/mimetypes/tabs_mimetypes.inc | 1 - 7 files changed, 14 insertions(+), 15 deletions(-) diff --git a/plugins/admin/fai/class_divListFai.inc b/plugins/admin/fai/class_divListFai.inc index 860be1ac2..7b66f47b8 100644 --- a/plugins/admin/fai/class_divListFai.inc +++ b/plugins/admin/fai/class_divListFai.inc @@ -94,8 +94,8 @@ class divListFai extends MultiSelectWindow /* Check if there are post commands available for fai management. * If not, grey out freeze/branch and release remove buttons. */ - $r = ("" != search_config($this->config->data,"faiManagement","POSTREMOVE")); - $c = ("" != search_config($this->config->data,"faiManagement","POSTCREATE")); + $r = $this->config->search("faiManagement", "POSTREMOVE"); + $c = $this->config->search("faiManagement", "POSTCREATE"); $smarty = get_smarty(); $smarty->assign("allow_create", $c); diff --git a/plugins/admin/fai/class_faiManagement.inc b/plugins/admin/fai/class_faiManagement.inc index 3ad80f9a5..61e9c5241 100644 --- a/plugins/admin/fai/class_faiManagement.inc +++ b/plugins/admin/fai/class_faiManagement.inc @@ -366,7 +366,7 @@ class faiManagement extends plugin /* Check if we have a post remove method configured * else skip this operation. (Skip:Button in the ui should be disabled in this case too) */ - if("" != search_config($this->config->data,"faiManagement","POSTREMOVE")){ + if("" != $this->config->search("faiManagement", "POSTREMOVE",array('tabs'))){ /* Load permissions for selected 'dn' and check if we're allowed to remove this 'dn' */ @@ -391,7 +391,7 @@ class faiManagement extends plugin /* Check if we have a post remove method configured * else skip this operation. (Skip:Button in the ui should be disabled in this case too) */ - if("" != search_config($this->config->data,"faiManagement","POSTREMOVE")){ + if("" != $this->config->search("faiManagement", "POSTREMOVE",array('tabs'))){ $bb = $this->DivListFai->selectedBranch; if(!isset($ldap)){ @@ -591,7 +591,7 @@ class faiManagement extends plugin /* Check if we have a post create method configured * else skip this operation. (Skip:Button in the ui should be disabled in this case too) */ - if("" != search_config($this->config->data,"faiManagement","POSTCREATE")){ + if("" != $this->config->search("faiManagement", "POSTCREATE",array('tabs'))){ if(($s_action == "branch_branch")||($this->dispNewBranch)){ $this->dispNewBranch=true; $smarty->assign("iframe",false); @@ -608,7 +608,7 @@ class faiManagement extends plugin /* Check if we have a post create method configured * else skip this operation. (Skip:Button in the ui should be disabled in this case too) */ - if("" != search_config($this->config->data,"faiManagement","POSTCREATE")){ + if("" != $this->config->search("faiManagement", "POSTCREATE",array('tabs'))){ if(($s_action == "freeze_branch")||($this->dispNewFreeze)){ $this->dispNewFreeze = true; $smarty->assign("iframe",false); diff --git a/plugins/admin/fai/class_faiSummaryTab.inc b/plugins/admin/fai/class_faiSummaryTab.inc index a6fa6dab0..0ba1257a6 100644 --- a/plugins/admin/fai/class_faiSummaryTab.inc +++ b/plugins/admin/fai/class_faiSummaryTab.inc @@ -170,7 +170,7 @@ class faiSummaryTab extends plugin{ { /* Skip this if fai is deactivated */ - $tmp = search_config($this->config->data,"faiManagement","CLASS"); + $tmp = $this->config->search("faiManagement", "CLASS"); if(empty($tmp)){ $str = "

"._("You can't use this plugin until FAI is activated.")."

"; return $str; diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc index 5d9ab683a..b4312c7de 100644 --- a/plugins/admin/groups/class_groupApplication.inc +++ b/plugins/admin/groups/class_groupApplication.inc @@ -45,7 +45,7 @@ class appgroup extends plugin { /* Check if we have relase mangement enabled and prepare group application for release management */ - $tmp = search_config($config->data,"faiManagement","CLASS"); + $tmp = $this->config->search("faiManagement", "CLASS"); if(!empty($tmp)){ $this->enableReleaseManagement = true; $this->objectclasses [] = "FAIreleaseTag"; @@ -539,7 +539,7 @@ class appgroup extends plugin $ldap= $this->config->get_ldap_link(); /* Check if we have release management enabled */ - $tmp = search_config($this->config->data,"faiManagement","CLASS"); + $tmp = $this->config->search("faiManagement", "CLASS"); if(!empty($tmp)){ /* Get application parameter from ldap */ @@ -1015,7 +1015,7 @@ class appgroup extends plugin $this->apps= array(); /* Special handling for release managed apps */ - $tmp = search_config($this->config->data,"faiManagement","CLASS"); + $tmp = $this->config->search("faiManagement", "CLASS"); if(!empty($tmp) && count($this->Releases)){ $this->enableReleaseManagement = true; @@ -1071,7 +1071,7 @@ class appgroup extends plugin /* Get all apps ... */ $res = get_list("objectClass=gosaApplication","application",$this->config->current['BASE'],array("gosaApplicationParameter","cn"),GL_SUBSEARCH); - $tmp = search_config($this->config->data,"faiManagement","CLASS"); + $tmp = $this->config->search("faiManagement", "CLASS"); $this->AllAppsForRelease = array(); if(!empty($tmp)){ $tmp = array_flip($this->Releases); diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc index 36b46eae9..b8c214933 100644 --- a/plugins/admin/groups/class_groupGeneric.inc +++ b/plugins/admin/groups/class_groupGeneric.inc @@ -264,13 +264,13 @@ class group extends plugin $smarty->assign("samba3", ""); } - if(search_config($this->config->data['MENU'], "nagiosaccount", "CLASS")){ + if($this->config->search("nagiosaccount", "CLASS",array('menu'))){ $smarty->assign("nagios",true); }else{ $smarty->assign("nagios",false); } - if(search_config($this->config->data['MENU'], "phoneAccount", "CLASS")){ + if($this->config->search("phoneAccount", "CLASS",array('menu'))){ $smarty->assign("pickupGroup",true); }else{ $smarty->assign("pickupGroup",false); diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc index 67cd7091c..59d189c6a 100644 --- a/plugins/admin/groups/class_groupManagement.inc +++ b/plugins/admin/groups/class_groupManagement.inc @@ -561,7 +561,7 @@ class groupManagement extends plugin $attrs = array("cn", "description", "gidNumber", "objectClass"); /* If subsearch is activated search for subobjects too */ - $tmp = search_config($this->config->data,"faiManagement","CLASS"); + $tmp = $this->config->search("faiManagement", "CLASS"); if(!empty($tmp)){ $attrs [] = "FAIrelease"; } diff --git a/plugins/admin/mimetypes/tabs_mimetypes.inc b/plugins/admin/mimetypes/tabs_mimetypes.inc index 66f1c01fe..379ae57fd 100755 --- a/plugins/admin/mimetypes/tabs_mimetypes.inc +++ b/plugins/admin/mimetypes/tabs_mimetypes.inc @@ -26,7 +26,6 @@ class mimetabs extends tabs /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ - $tmp = search_config($this->config->data,"faiManagement","CLASS"); $tmp = $this->config->search("faiManagement", "CLASS"); if((!empty($tmp)) && (isset($_SESSION['mimefilter']['release']))){ -- 2.30.2