From: hickert Date: Tue, 25 Sep 2007 09:13:53 +0000 (+0000) Subject: Fixed several fai checks, X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6a7350fd7ad1385430772ed396706aef2bffcce4;p=gosa.git Fixed several fai checks, config->search()s weren't used for correct type of category 'menu' instead of 'tabs' git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7398 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/applications/class_applicationGeneric.inc b/plugins/admin/applications/class_applicationGeneric.inc index be1a6c632..88f199974 100644 --- a/plugins/admin/applications/class_applicationGeneric.inc +++ b/plugins/admin/applications/class_applicationGeneric.inc @@ -33,7 +33,7 @@ class application extends plugin { plugin::plugin ($config, $dn, $parent); - $tmp = $this->config->search("faiManagement", "CLASS",array('tabs')); + $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs')); if(!empty($tmp)) { if(!preg_match("/^ou=apps,/",$_SESSION['appfilter']['release'])){ $this->isReleaseApplikation = true; @@ -410,7 +410,7 @@ class application extends plugin $ldap= $this->config->get_ldap_link(); $ldap->cd($this->config->current["BASE"]); - $tmp = $this->config->search("faiManagement", "CLASS",array('tabs')); + $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs')); if((!empty($tmp)) && (isset($_SESSION['appfilter']['release']))){ $baseDn = str_replace($this->config->current['BASE'],$this->base,$_SESSION['appfilter']['release']); $baseDn = preg_replace("/ou=apps,.*/","ou=apps,".$this->base,$_SESSION['appfilter']['release']); diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc index 95d05a84d..45914bd4e 100644 --- a/plugins/admin/applications/class_applicationManagement.inc +++ b/plugins/admin/applications/class_applicationManagement.inc @@ -36,7 +36,7 @@ class applicationManagement extends plugin function IsReleaseManagementActivated() { /* Check if we should enable the release selection */ - $tmp = $this->config->search("faiManagement", "CLASS",array('tabs')); + $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs')); if(!empty($tmp)){ return(true); } diff --git a/plugins/admin/applications/tabs_application.inc b/plugins/admin/applications/tabs_application.inc index aa9600808..059e68335 100644 --- a/plugins/admin/applications/tabs_application.inc +++ b/plugins/admin/applications/tabs_application.inc @@ -26,7 +26,7 @@ class apptabs extends tabs /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ - $tmp = $this->config->search("faiManagement", "CLASS",array('tabs')); + $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs')); if((!empty($tmp)) && (isset($_SESSION['appfilter']['release']))){ if(!$baseobject->isReleaseApplikation){ $new_dn= "cn=".$baseobject->cn.",ou=apps,".$baseobject->base; diff --git a/plugins/admin/fai/class_divListFai.inc b/plugins/admin/fai/class_divListFai.inc index 020dac80a..1406ae99d 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 = $this->config->search("faiManagement", "POSTREMOVE",array('tabs')); - $c = $this->config->search("faiManagement", "POSTCREATE",array('tabs')); + $r = $this->config->search("faiManagement", "POSTREMOVE",array('menu','tabs')); + $c = $this->config->search("faiManagement", "POSTCREATE",array('menu','tabs')); $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 61e9c5241..0473df36a 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("" != $this->config->search("faiManagement", "POSTREMOVE",array('tabs'))){ + if("" != $this->config->search("faiManagement", "POSTREMOVE",array('menu','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("" != $this->config->search("faiManagement", "POSTREMOVE",array('tabs'))){ + if("" != $this->config->search("faiManagement", "POSTREMOVE",array('menu','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("" != $this->config->search("faiManagement", "POSTCREATE",array('tabs'))){ + if("" != $this->config->search("faiManagement", "POSTCREATE",array('menu','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("" != $this->config->search("faiManagement", "POSTCREATE",array('tabs'))){ + if("" != $this->config->search("faiManagement", "POSTCREATE",array('menu','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 91c5ec346..38b170841 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 = $this->config->search("faiManagement", "CLASS",array('tabs')); + $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs')); 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 18a5a0dc5..fcc9d391c 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 = $config->search("faiManagement", "CLASS",array('tabs')); + $tmp = $config->search("faiManagement", "CLASS",array('menu','tabs')); 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 = $this->config->search("faiManagement", "CLASS",array('tabs')); + $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs')); 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 = $this->config->search("faiManagement", "CLASS",array('tabs')); + $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs')); 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 = $this->config->search("faiManagement", "CLASS",array('tabs')); + $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs')); $this->AllAppsForRelease = array(); if(!empty($tmp)){ $tmp = array_flip($this->Releases); diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc index 0b0030bbb..ddadcf6a2 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 = $this->config->search("faiManagement", "CLASS",array('tabs')); + $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs')); if(!empty($tmp)){ $attrs [] = "FAIrelease"; } diff --git a/plugins/admin/mimetypes/class_mimetypeGeneric.inc b/plugins/admin/mimetypes/class_mimetypeGeneric.inc index bac08e9cd..e70c21a02 100644 --- a/plugins/admin/mimetypes/class_mimetypeGeneric.inc +++ b/plugins/admin/mimetypes/class_mimetypeGeneric.inc @@ -115,7 +115,7 @@ class mimetype extends plugin } /* Check if release Management is enabled */ - $tmp = $this->config->search("faiManagement", "CLASS",array('tabs')); + $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs')); if(!empty($tmp)) { $this->isReleaseMimeType= true; } diff --git a/plugins/admin/mimetypes/class_mimetypeManagement.inc b/plugins/admin/mimetypes/class_mimetypeManagement.inc index eda0cf23c..f192eb21d 100755 --- a/plugins/admin/mimetypes/class_mimetypeManagement.inc +++ b/plugins/admin/mimetypes/class_mimetypeManagement.inc @@ -592,7 +592,7 @@ class mimetypeManagement extends plugin function IsReleaseManagementActivated() { /* Check if we should enable the release selection */ - $tmp = $this->config->search("faiManagement", "CLASS",array('tabs')); + $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs')); if(!empty($tmp)){ return(true); } diff --git a/plugins/admin/mimetypes/tabs_mimetypes.inc b/plugins/admin/mimetypes/tabs_mimetypes.inc index 0aae1f43b..6c1cd34c4 100755 --- a/plugins/admin/mimetypes/tabs_mimetypes.inc +++ b/plugins/admin/mimetypes/tabs_mimetypes.inc @@ -26,7 +26,7 @@ class mimetabs extends tabs /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ - $tmp = $this->config->search("faiManagement", "CLASS",array('tabs')); + $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs')); if((!empty($tmp)) && (isset($_SESSION['mimefilter']['release']))){ if(!$baseobject->isReleaseMimeType){ diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc index 54df43945..375169693 100644 --- a/plugins/admin/systems/class_servGeneric.inc +++ b/plugins/admin/systems/class_servGeneric.inc @@ -43,7 +43,7 @@ class servgeneric extends plugin function servgeneric (&$config, $dn= NULL, $parent= NULL) { /* Check if FAI is activated */ - $tmp = $config->search("faiManagement", "CLASS",array('tabs')); + $tmp = $config->search("faiManagement", "CLASS",array('menu','tabs')); if(!empty($tmp)){ $this->fai_activated = TRUE; diff --git a/plugins/admin/systems/class_servRepository.inc b/plugins/admin/systems/class_servRepository.inc index efb4bd8f8..41c84d330 100644 --- a/plugins/admin/systems/class_servRepository.inc +++ b/plugins/admin/systems/class_servRepository.inc @@ -32,16 +32,16 @@ class servrepository extends goService { plugin::plugin ($config, $dn, $parent); + $this->DisplayName = _("Repository service"); + /* Skip this if fai is deactivated */ - $tmp= $this->config->search("faiManagement", "CLASS",array('tabs')); + $tmp= $this->config->search("faiManagement", "CLASS",array('menu','tabs')); if(!empty($tmp)){ $this->fai_activated = TRUE; }else{ return; } - $this->DisplayName = _("Repository service"); - $this->repositories = array(); if(isset($this->attrs['FAIrepository'])){ for($i = 0; $i < $this->attrs['FAIrepository']['count']; $i++){ @@ -249,7 +249,7 @@ class servrepository extends goService Repository setup dialog handling /END */ - $divlist = new divList("repositories"); + $divlist = new divlist("repositories"); $divlist->SetEntriesPerPage(0); $divlist->setHeight(400); $divlist->SetPluginMode(); diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index b7bdc36e9..3b2813f8c 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -957,7 +957,7 @@ class systems extends plugin $sys_categories = array("terminal", "workstation", "server", "phone" ,"printer"); /* Add FAIstate to attributes if FAI is activated */ - $tmp = $this->config->search("faiManagement", "CLASS",array('tabs')); + $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs')); if(!empty($tmp)){ $sys_attrs[] = "FAIstate"; } diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc index 72d81633d..64e37b81f 100644 --- a/plugins/admin/systems/class_terminalGeneric.inc +++ b/plugins/admin/systems/class_terminalGeneric.inc @@ -63,7 +63,7 @@ class termgeneric extends plugin function termgeneric (&$config, $dn= NULL, $parent= NULL) { /* Check if FAI is activated */ - $tmp= $config->search("faiManagement", "CLASS",array('tabs')); + $tmp= $config->search("faiManagement", "CLASS",array('menu','tabs')); if(!empty($tmp)){ $this->fai_activated = TRUE; } diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc index 5144b1688..db73b29f6 100644 --- a/plugins/admin/systems/class_workstationGeneric.inc +++ b/plugins/admin/systems/class_workstationGeneric.inc @@ -68,7 +68,7 @@ class workgeneric extends plugin function workgeneric (&$config, $dn= NULL, $parent= NULL) { - $tmp= $config->search("faiManagement", "CLASS",array('tabs')); + $tmp= $config->search("faiManagement", "CLASS",array('menu','tabs')); if(!empty($tmp)){ $this->fai_activated = TRUE; } diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index eaecb0187..dfee10ace 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -61,7 +61,7 @@ class workstartup extends plugin function workstartup (&$config, $dn= NULL, $parent= NULL) { /* Check if FAI is active */ - $tmp= $config->search("faiManagement", "CLASS",array('tabs')); + $tmp= $config->search("faiManagement", "CLASS",array('menu','tabs')); if(!empty($tmp)){ $this->fai_activated = TRUE; }else{