From: hickert Date: Fri, 6 Nov 2009 07:36:27 +0000 (+0000) Subject: Made headpage and filter private X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bb6c2d529cb33ea79a11a807d83ad4b8f5bc630d;p=gosa.git Made headpage and filter private git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14769 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_management.inc b/gosa-core/include/class_management.inc index 6a4675e50..4439b559a 100644 --- a/gosa-core/include/class_management.inc +++ b/gosa-core/include/class_management.inc @@ -70,8 +70,8 @@ class management protected $snapHandler = null; // The listing handlers - protected $headpage = null; - protected $filter = null; + private $headpage = null; + private $filter = null; // A list of configured actions/events protected $actions = array(); @@ -166,13 +166,27 @@ class management } $this->snapHandler->setSnapshotBases($bases); } - + + // Display list + return($this->renderList()); + } + + function renderList() + { $this->headpage->update(); $display = $this->headpage->render(); return($this->getHeader().$display); } + function getHeadpage() + { + return($this->headpage); + } + function getFilter() + { + return($this->filter); + } /*! \brief Generates the plugin header which is displayed whenever a tab object is * opened. @@ -333,6 +347,10 @@ class management */ function detectPostActions() { + if(!is_object($this->headpage)){ + trigger_error("No valid headpage given....!"); + return(array()); + } $action= $this->headpage->getAction(); if(isset($_POST['edit_apply'])) $action['action'] = "apply"; if(isset($_POST['edit_finish'])) $action['action'] = "save"; diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc index e3bf7e759..ac40ce062 100644 --- a/gosa-core/plugins/admin/departments/class_departmentManagement.inc +++ b/gosa-core/plugins/admin/departments/class_departmentManagement.inc @@ -101,7 +101,8 @@ class departmentManagement extends management function editEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="") { $types= $this->get_support_departments(); - $type = $this->headpage->getType($target[0]); + $headpage = $this->getHeadpage(); + $type = $headpage->getType($target[0]); return(management::editEntry($action,$target,$all,$this->tabClass,$types[$type]['TAB'],$this->aclCategory)); } @@ -115,7 +116,8 @@ class departmentManagement extends management $config->get_departments(); $config->make_idepartments(); $this->config = $config; - $this->headpage->refreshBasesList(); + $headpage = $this->getHeadpage(); + $headpage->refreshBasesList(); $plugname = $this->last_tabObject->base_name; if($this->last_tabObject->by_object[$plugname]->must_be_tagged()){ @@ -130,7 +132,8 @@ class departmentManagement extends management // An action handler which enables to switch into deparmtment by clicking the names. function openEntry($action,$entry) { - $this->headpage->setBase(array_pop($entry)); + $headpage = $this->getHeadpage(); + $headpage->setBase(array_pop($entry)); }