getGroups was not handling the case where limit=null correctly
This commit is contained in:
parent
73b4d770a2
commit
7177585630
@ -577,11 +577,13 @@ class User extends Memcached_DataObject
|
|||||||
'WHERE group_member.profile_id = %d ' .
|
'WHERE group_member.profile_id = %d ' .
|
||||||
'ORDER BY group_member.created DESC ';
|
'ORDER BY group_member.created DESC ';
|
||||||
|
|
||||||
if ($offset) {
|
if ($offset>0 && !is_null($limit)) {
|
||||||
if (common_config('db','type') == 'pgsql') {
|
if ($offset) {
|
||||||
$qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset;
|
if (common_config('db','type') == 'pgsql') {
|
||||||
} else {
|
$qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset;
|
||||||
$qry .= ' LIMIT ' . $offset . ', ' . $limit;
|
} else {
|
||||||
|
$qry .= ' LIMIT ' . $offset . ', ' . $limit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user