From: cajus Date: Mon, 17 Aug 2009 12:45:12 +0000 (+0000) Subject: Move filter + headpage to session X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b31e329e6c32401a60ab509667752f1bffbe1355;p=gosa.git Move filter + headpage to session git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14076 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index 2b46d6c69..06c42283e 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -43,6 +43,11 @@ class userManagement extends plugin var $acl_module = array("users"); var $dns = array(); + // Filter/headpage tests + var $filter= null; + var $headpage= null; + + function userManagement(&$config, $ui) { /* Save configuration for internal use */ @@ -980,32 +985,36 @@ class userManagement extends plugin # FILTER Test ################################################# ## Build filter - #$filter = new filter(get_template_path("user-filter.xml", true)); - #$filter->setObjectStorage(get_people_ou()); - #$filter->update(); - #session::set('autocomplete', $filter); - #if (!$filter->isValid()){ + #if (!$this->filter) { + # $this->filter = new filter(get_template_path("user-filter.xml", true)); + # $this->filter->setObjectStorage(get_people_ou()); + #} + #$this->filter->update(); + #session::set('autocomplete', $this->filter); + #if (!$this->filter->isValid()){ # msg_dialog::display(_("Filter error"), _("The filter is uncomplete!"), ERROR_DIALOG); #} ## Build headpage - #$headpage = new listing(get_template_path("user-list.xml", true)); - #$headpage->registerElementFilter("accountProperties", "userManagement::filterProperties"); - #$headpage->registerElementFilter("lockLabel", "userManagement::filterLockLabel"); - #$headpage->registerElementFilter("lockImage", "userManagement::filterLockImage"); - #$headpage->setFilter($filter); + #if (!$this->headpage){ + # $this->headpage = new listing(get_template_path("user-list.xml", true)); + # $this->headpage->registerElementFilter("accountProperties", "userManagement::filterProperties"); + # $this->headpage->registerElementFilter("lockLabel", "userManagement::filterLockLabel"); + # $this->headpage->registerElementFilter("lockImage", "userManagement::filterLockImage"); + # $this->headpage->setFilter($this->filter); + #} ## Needs to be called before update! - #$action= $headpage->getAction(); + #$action= $this->headpage->getAction(); #if ($action['action'] != '') { # echo "List detected action:"; # print_a($action); #} ## Refresh for filter - #$headpage->update(); + #$this->headpage->update(); # - #return($headpage->render()); + #return($this->headpage->render()); ################################################### FILTER Test return($this->DivListUsers->Draw());