From: hickert Date: Tue, 2 Aug 2005 08:57:22 +0000 (+0000) Subject: Fixed filter reset, if group is added X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bfecaba42c1d45b89a8c01f20a45aabff6d0517e;p=gosa.git Fixed filter reset, if group is added git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1045 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index 7e8d1ea0f..9e60df166 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -41,7 +41,7 @@ class userManagement extends plugin $this->ui= $ui; /* Get global filter config */ - if (!is_global("userfilter")){ + if (!isset($_SESSION["userfilter"])){ $base= get_base_from_people($ui->dn); $userfilter= array( "mailusers" => "checked", "unixusers" => "checked", @@ -53,7 +53,7 @@ class userManagement extends plugin "functionalusers" => "checked", "depselect" => $base, "regex" => "*"); - register_global("userfilter", $userfilter); + $_SESSION["userfilter"] = $userfilter; } } @@ -143,13 +143,11 @@ class userManagement extends plugin /* Save filter data if we are in the headpage */ if (!isset($this->usertab)){ - foreach( array("regex") as $type){ - if (isset($_POST[$type])){ - $userfilter[$type]= $_POST[$type]; - } + if (isset($_POST['regexit'])){ + $userfilter["regex"]= $_POST['regexit']; } } - if(isset($_POST['regex'])){ + if(isset($_POST['regexit'])){ foreach( array("functionalusers", "unixusers", "mailusers","sambausers", "proxyusers", "faxusers", "templates", "subsearch") as $type){ if (isset($_POST[$type])) { $userfilter[$type]= "checked"; @@ -739,13 +737,14 @@ class userManagement extends plugin $smarty->assign("infoimage", get_template_path('images/info.png')); $smarty->assign("launchimage", get_template_path('images/launch.png')); $smarty->assign("deplist", $this->config->idepartments); - foreach( array("depselect", "regex", "functionalusers", "unixusers", + foreach( array("depselect", "functionalusers", "unixusers", "mailusers", "sambausers", "proxyusers", "faxusers", "templates", "subsearch") as $type){ $smarty->assign("$type", $userfilter[$type]); } + $smarty->assign("regex", $userfilter["regex"]); /* Extend if we are not using javascript */ $smarty->assign("apply", apply_filter()); $smarty->assign("alphabet", generate_alphabet()); diff --git a/plugins/admin/users/headpage.tpl b/plugins/admin/users/headpage.tpl index 1c31477e4..22304bac0 100644 --- a/plugins/admin/users/headpage.tpl +++ b/plugins/admin/users/headpage.tpl @@ -46,7 +46,7 @@ -
Search
+ {$apply}