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/usermanager | |
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/usermanager')
-rw-r--r-- | lib/plugins/usermanager/admin.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index b1f5c4023..cc4c4ae47 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -31,6 +31,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { protected $_edit_userdata = array(); protected $_disabled = ''; // if disabled set to explanatory string protected $_import_failures = array(); + protected $_lastdisabled = false; // set to true if last user is unknown and last button is hence buggy /** * Constructor @@ -96,6 +97,13 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } /** + * @param boolean $lastdisabled + */ + public function setLastdisabled($lastdisabled) { + $this->_lastdisabled = $lastdisabled; + } + + /** * Handle user request * * @return bool @@ -850,6 +858,10 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $buttons['last'] = $buttons['next'] = (($this->_start + $this->_pagesize) >= $this->_user_total) ? $disabled : ''; } + if ($this->_lastdisabled) { + $buttons['last'] = $disabled; + } + return $buttons; } |