summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-02-02 16:42:27 -0500
committerEvan Prodromou <evan@controlyourself.ca>2009-02-02 16:42:27 -0500
commitdaa5797809ec9315db463c5ecc721f1273c0d17e (patch)
tree8ecd1328f3b22baefc2c77a0dc61ebe3163ed5b0 /classes
parenta381bff4da077b84baaa56ef9780eb806e14b7dd (diff)
parent2f37539967efa3e30873d836b308a64fdc48078a (diff)
Merge branch 'master' of git://gitorious.org/laconica/adrianlang-clone into adrianlang/master
Diffstat (limited to 'classes')
-rwxr-xr-xclasses/User_group.php13
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;
}