Code

Fixed several fai checks,
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 25 Sep 2007 09:13:53 +0000 (09:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 25 Sep 2007 09:13:53 +0000 (09:13 +0000)
 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

17 files changed:
plugins/admin/applications/class_applicationGeneric.inc
plugins/admin/applications/class_applicationManagement.inc
plugins/admin/applications/tabs_application.inc
plugins/admin/fai/class_divListFai.inc
plugins/admin/fai/class_faiManagement.inc
plugins/admin/fai/class_faiSummaryTab.inc
plugins/admin/groups/class_groupApplication.inc
plugins/admin/groups/class_groupManagement.inc
plugins/admin/mimetypes/class_mimetypeGeneric.inc
plugins/admin/mimetypes/class_mimetypeManagement.inc
plugins/admin/mimetypes/tabs_mimetypes.inc
plugins/admin/systems/class_servGeneric.inc
plugins/admin/systems/class_servRepository.inc
plugins/admin/systems/class_systemManagement.inc
plugins/admin/systems/class_terminalGeneric.inc
plugins/admin/systems/class_workstationGeneric.inc
plugins/admin/systems/class_workstationStartup.inc

index be1a6c6327e6b32ba7ab6ad1e83e8e5fe9873d2e..88f199974e261ae8c5f87125076ce35196c02b4b 100644 (file)
@@ -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']);
index 95d05a84d7b3d1564fdd4ac78f250a01e6fa89cd..45914bd4ed62768a3e405ae39da5fdd8215f84ae 100644 (file)
@@ -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);
     }
index aa9600808dd87643369e500dd5051437ac6bb655..059e68335a8d0589f8c087390810fcb3010cfa8c 100644 (file)
@@ -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;
index 020dac80ae31186ed84ce059333839165c30be1a..1406ae99d026cec0f52300f371db158fa5316270 100644 (file)
@@ -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);
index 61e9c5241045898d74787c4db84630936b1ee616..0473df36ab6cf77b5d9a5ea08882edb3690ce887 100644 (file)
@@ -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);
index 91c5ec346fde6050f8b3990e8edf6455c33c9f35..38b170841ef9d6059cfd9c91382ea3535aa2126b 100644 (file)
@@ -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 = "<h2>"._("You can't use this plugin until FAI is activated.")."</h2>";
       return $str;
index 18a5a0dc5b15e725412d2f18d3ea2cc80cccbccc..fcc9d391c504be205c2699e4a6a0fc774720434f 100644 (file)
@@ -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);
index 0b0030bbb67a6596ef79151fc93f7c43aa3c1c9f..ddadcf6a27fc4e65a88f70b875c72995116373ea 100644 (file)
@@ -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";
     }
index bac08e9cd915e64acf308cbf6e1a52bafe22baa2..e70c21a029332bd44f0cbbb40c4f73bfaeec481c 100644 (file)
@@ -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;
     }
index eda0cf23ca2d0e3a8c13479f2607b4a175a2e2cf..f192eb21d96c892b1c514070bf68c81aa43f077e 100755 (executable)
@@ -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);
     }
index 0aae1f43bef15af9a407f53c7da787d950afdd2b..6c1cd34c4d6615b418d87bed3e2336fd7ca0de02 100755 (executable)
@@ -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){
index 54df43945a524167170c02e3564d46bac1b1843d..375169693551a08813c0e5d8a5514a085ea5146c 100644 (file)
@@ -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;
index efb4bd8f89dcad787fddf9dfc0dc57a26dd84fec..41c84d330c7b1e458965d57be3bce6dd9b3a587b 100644 (file)
@@ -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();
index b7bdc36e95702487a3374ec5b532e8bfd37a7ca8..3b2813f8cb88df3ecd35030e43e14a7bc4df4718 100644 (file)
@@ -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";
     }    
index 72d81633dad2746dc01789a34f6f2b04ed2335fb..64e37b81f668805b110c5242a2d74d99e3eb9d0f 100644 (file)
@@ -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;
     }
index 5144b16888d6845f0ce0365992d831b02ade0c6b..db73b29f69093fc5e7965f889a0c91f32a70838d 100644 (file)
@@ -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;
     }
index eaecb0187e89af333c0dddea2901c8c2feaf59b9..dfee10ace42f4b0fe7a29172b5205d193054cb9c 100644 (file)
@@ -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{