diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-02-02 16:42:27 -0500 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-02-02 16:42:27 -0500 |
commit | daa5797809ec9315db463c5ecc721f1273c0d17e (patch) | |
tree | 8ecd1328f3b22baefc2c77a0dc61ebe3163ed5b0 /classes | |
parent | a381bff4da077b84baaa56ef9780eb806e14b7dd (diff) | |
parent | 2f37539967efa3e30873d836b308a64fdc48078a (diff) |
Merge branch 'master' of git://gitorious.org/laconica/adrianlang-clone into adrianlang/master
Diffstat (limited to 'classes')
-rwxr-xr-x | classes/User_group.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/classes/User_group.php b/classes/User_group.php index 5b5b102c7..522dd8143 100755 --- a/classes/User_group.php +++ b/classes/User_group.php @@ -74,16 +74,17 @@ class User_group extends Memcached_DataObject 'WHERE group_member.group_id = %d ' . 'ORDER BY group_member.created DESC '; - if (common_config('db','type') == 'pgsql') { - $qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset; - } else { - $qry .= ' LIMIT ' . $offset . ', ' . $limit; + if ($limit != null) { + if (common_config('db','type') == 'pgsql') { + $qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset; + } else { + $qry .= ' LIMIT ' . $offset . ', ' . $limit; + } } $members = new Profile(); - $cnt = $members->query(sprintf($qry, $this->id)); - + $members->query(sprintf($qry, $this->id)); return $members; } |