diff options
author | Michael Große <grosse@cosmocode.de> | 2015-03-12 15:06:26 +0100 |
---|---|---|
committer | Michael Große <grosse@cosmocode.de> | 2015-03-12 15:06:26 +0100 |
commit | 462e9e37f38d6de9ec19ad1476b64bac3b851fc1 (patch) | |
tree | 4ffed496320f3a9305e3d39f88c2a026c493c8db /lib/plugins/authad/auth.php | |
parent | c52f6cd2bf68bccfbc665f376f68c93861a99837 (diff) | |
download | rpg-462e9e37f38d6de9ec19ad1476b64bac3b851fc1.tar.gz rpg-462e9e37f38d6de9ec19ad1476b64bac3b851fc1.tar.bz2 |
Disable the ``last`` button when filtering groups
Since we cannot effectively filter for groups and have to work with
incremental prefetching, the ``last`` button is mostly broken/buggy.
Hence it is disabled in this usecase.
Diffstat (limited to 'lib/plugins/authad/auth.php')
-rw-r--r-- | lib/plugins/authad/auth.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 2710d6a17..4022cd68f 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -387,12 +387,16 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { if (isset($filter['grps'])) { $this->users = array_fill_keys($result, false); $usermanager = plugin_load("admin", "usermanager", false); + $usermanager->setLastdisabled(true); if (!isset($this->_grpsusers[$this->_filterToString($filter)])){ $this->_fillGroupUserArray($filter,$usermanager->getStart() + 3*$usermanager->getPagesize()); } elseif (count($this->_grpsusers[$this->_filterToString($filter)]) < getStart() + 3*$usermanager->getPagesize()) { $this->_fillGroupUserArray($filter,$usermanager->getStart() + 3*$usermanager->getPagesize() - count($this->_grpsusers[$this->_filterToString($filter)])); } $result = $this->_grpsusers[$this->_filterToString($filter)]; + } else { + $usermanager = plugin_load("admin", "usermanager", false); + $usermanager->setLastdisabled(false); } } @@ -470,6 +474,8 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { $result = array(); if (!isset($filter['grps'])) { + $usermanager = plugin_load("admin", "usermanager", false); + $usermanager->setLastdisabled(false); foreach($this->users as $user => &$info) { if($i++ < $start) { continue; @@ -483,6 +489,8 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { } } } else { + $usermanager = plugin_load("admin", "usermanager", false); + $usermanager->setLastdisabled(true); if (!isset($this->_grpsusers[$this->_filterToString($filter)]) || count($this->_grpsusers[$this->_filterToString($filter)]) < ($start+$limit)) { $this->_fillGroupUserArray($filter,$start+$limit - count($this->_grpsusers[$this->_filterToString($filter)]) +1); } |