diff options
author | Andreas Gohr <andi@splitbrain.org> | 2014-02-15 12:45:58 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2014-02-15 12:46:26 +0100 |
commit | b9a6663fa7b0c5a5ac67e903ad77e0a8277029aa (patch) | |
tree | f5339970d0ad8db7f98c51f69da64b3f4d0e7628 /lib/plugins/authpgsql/auth.php | |
parent | 9a2c73e86d2549a2cd63d7f772b4bb1a3956e46f (diff) | |
download | rpg-b9a6663fa7b0c5a5ac67e903ad77e0a8277029aa.tar.gz rpg-b9a6663fa7b0c5a5ac67e903ad77e0a8277029aa.tar.bz2 |
handle limit=0 correctly in authmysql/pgsql FS#2919
Diffstat (limited to 'lib/plugins/authpgsql/auth.php')
-rw-r--r-- | lib/plugins/authpgsql/auth.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/plugins/authpgsql/auth.php b/lib/plugins/authpgsql/auth.php index 240db80fa..e51b39858 100644 --- a/lib/plugins/authpgsql/auth.php +++ b/lib/plugins/authpgsql/auth.php @@ -154,7 +154,9 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { if($this->_openDB()) { $this->_lockTables("READ"); $sql = $this->_createSQLFilter($this->conf['getUsers'], $filter); - $sql .= " ".$this->conf['SortOrder']." LIMIT $limit OFFSET $first"; + $sql .= " ".$this->conf['SortOrder']; + if($limit) $sql .= " LIMIT $limit"; + if($first) $sql .= " OFFSET $first"; $result = $this->_queryDB($sql); foreach($result as $user) |