From: hickert Date: Wed, 13 Aug 2008 07:05:02 +0000 (+0000) Subject: Added default_release option X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=29bf6299bf80f3d8bce8602f8832752e2ef4badf;p=gosa.git Added default_release option -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 --- diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index 2e19541e6..e1bea00f6 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -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"); diff --git a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc index 1790fe29d..7d028102d 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc @@ -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']; diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc index 5bbe95dea..b9d583b90 100644 --- a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc +++ b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc @@ -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'];