diff options
author | Evan Prodromou <evan@status.net> | 2009-11-17 06:25:07 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-11-17 06:25:07 -0500 |
commit | 6a1afda259c5223449f679a64f932e36df5ebe39 (patch) | |
tree | 7d754e8a1b7734c6750ca84b28ba0e93213e0a86 /classes/User.php | |
parent | d59af0296070cd868855564a0280e4be2c16410d (diff) | |
parent | 75c00f0054c08c7b49515c849260afbb6913f525 (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
classes/statusnet.ini
Diffstat (limited to 'classes/User.php')
-rw-r--r-- | classes/User.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/classes/User.php b/classes/User.php index a466369a1..f905ea2b7 100644 --- a/classes/User.php +++ b/classes/User.php @@ -577,11 +577,13 @@ class User extends Memcached_DataObject 'WHERE group_member.profile_id = %d ' . 'ORDER BY group_member.created DESC '; - if ($offset) { - if (common_config('db','type') == 'pgsql') { - $qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset; - } else { - $qry .= ' LIMIT ' . $offset . ', ' . $limit; + if ($offset>0 && !is_null($limit)) { + if ($offset) { + if (common_config('db','type') == 'pgsql') { + $qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset; + } else { + $qry .= ' LIMIT ' . $offset . ', ' . $limit; + } } } |