Code

Added default_release option
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 13 Aug 2008 07:05:02 +0000 (07:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 13 Aug 2008 07:05:02 +0000 (07:05 +0000)
-You are now able to set a default release for those plugins.

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

gosa-plugins/fai/admin/fai/class_faiManagement.inc
gosa-plugins/goto/admin/applications/class_applicationManagement.inc
gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc

index 2e19541e6f35ff92fcaa9fb13df21a540f3a0148..e1bea00f682d2c537ed9cbb0a4f9ea0489655df9 100644 (file)
@@ -76,7 +76,14 @@ class faiManagement extends plugin
     /* Set default release */
     $this->fai_base = get_ou("faiou").$this->config->current['BASE'];
     if(!session::is_set("fai_filter")){
-      session::set("fai_filter",array("fai_release" => $this->fai_base));
+
+      /* Set intial release */
+      $rel = $config->search("faiManagement","DEFAULT_RELEASE",array("menu"));
+      if(empty($rel)){
+        $rel = $this->fai_base;
+      }
+
+      session::set("fai_filter",array("fai_release" => $rel));
     }
 
     $fai_filter = session::get("fai_filter");
index 1790fe29d9ecdd2ba0409e2b43d9eabd12231691..7d028102d40e309c9d6b6af8b32af2c3cfce9266 100644 (file)
@@ -77,7 +77,13 @@ class applicationManagement extends plugin
     if(!$this->IsReleaseManagementActivated()){
       $this->app_base = get_ou("applicationou").$this->config->current['BASE'];
       if(!session::is_set("app_filter")){
-        session::set("app_filter",array("app_base" => $this->app_base));
+
+        /* Set intial release */
+        $rel = $config->search("faiManagement","DEFAULT_RELEASE",array("menu"));
+        if(empty($rel)){
+          $rel = $this->app_base;
+        }
+        session::set("app_filter",array("app_base" => $rel));
       }
       $app_filter     = session::get("app_filter");
       $this->app_base = $app_filter['app_base'];
index 5bbe95dea17fb7f48876fd2d10896b5650942ea6..b9d583b90ce0a4107218786ec5ba3365b638225e 100644 (file)
@@ -77,7 +77,13 @@ class mimetypeManagement extends plugin
     if(!$this->IsReleaseManagementActivated()){
       $this->mime_base = get_ou("mimetypeou").$this->config->current['BASE'];
       if(!session::is_set("mime_filter")){
-        session::set("mime_filter",array("mime_base" => $this->mime_base));
+
+        /* Set intial release */
+        $rel = $config->search("faiManagement","DEFAULT_RELEASE",array("menu"));
+        if(empty($rel)){
+          $rel = $this->mime_base;
+        }
+        session::set("mime_filter",array("mime_base" => $rel));
       }
       $mime_filter     = session::get("mime_filter");
       $this->mime_base = $mime_filter['mime_base'];