summaryrefslogtreecommitdiff
path: root/lib/plugins/authmysql/auth.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2014-02-15 12:45:58 +0100
committerAndreas Gohr <andi@splitbrain.org>2014-02-15 12:46:26 +0100
commitb9a6663fa7b0c5a5ac67e903ad77e0a8277029aa (patch)
treef5339970d0ad8db7f98c51f69da64b3f4d0e7628 /lib/plugins/authmysql/auth.php
parent9a2c73e86d2549a2cd63d7f772b4bb1a3956e46f (diff)
downloadrpg-b9a6663fa7b0c5a5ac67e903ad77e0a8277029aa.tar.gz
rpg-b9a6663fa7b0c5a5ac67e903ad77e0a8277029aa.tar.bz2
handle limit=0 correctly in authmysql/pgsql FS#2919
Diffstat (limited to 'lib/plugins/authmysql/auth.php')
-rw-r--r--lib/plugins/authmysql/auth.php7
1 files changed, 6 insertions, 1 deletions
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)) {