From 9a2c73e86d2549a2cd63d7f772b4bb1a3956e46f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 15 Feb 2014 12:36:15 +0100 Subject: streamlined retrieveUsers() signature over all auth plugins FS#2919 --- lib/plugins/authmysql/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins/authmysql/auth.php') diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php index 036644a67..3ebd5123f 100644 --- a/lib/plugins/authmysql/auth.php +++ b/lib/plugins/authmysql/auth.php @@ -352,7 +352,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * @param array|string $filter array of field/pattern pairs * @return array userinfo (refer getUserData for internal userinfo details) */ - public function retrieveUsers($first = 0, $limit = 10, $filter = array()) { + public function retrieveUsers($first = 0, $limit = 0, $filter = array()) { $out = array(); if($this->_openDB()) { -- cgit v1.2.3 From b9a6663fa7b0c5a5ac67e903ad77e0a8277029aa Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 15 Feb 2014 12:45:58 +0100 Subject: handle limit=0 correctly in authmysql/pgsql FS#2919 --- lib/plugins/authmysql/auth.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/plugins/authmysql/auth.php') diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php index 3ebd5123f..1e6e6a4a9 100644 --- a/lib/plugins/authmysql/auth.php +++ b/lib/plugins/authmysql/auth.php @@ -358,7 +358,12 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { if($this->_openDB()) { $this->_lockTables("READ"); $sql = $this->_createSQLFilter($this->getConf('getUsers'), $filter); - $sql .= " ".$this->getConf('SortOrder')." LIMIT $first, $limit"; + $sql .= " ".$this->getConf('SortOrder'); + if($limit) { + $sql .= " LIMIT $first, $limit"; + } elseif($first) { + $sql .= " LIMIT $first"; + } $result = $this->_queryDB($sql); if(!empty($result)) { -- cgit v1.2.3