Merge commit 'origin/testing' into 0.9.x
Conflicts: lib/action.php lib/adminpanelaction.php
This commit is contained in:
@@ -613,28 +613,8 @@ class User extends Memcached_DataObject
|
||||
|
||||
function getGroups($offset=0, $limit=null)
|
||||
{
|
||||
$qry =
|
||||
'SELECT user_group.* ' .
|
||||
'FROM user_group JOIN group_member '.
|
||||
'ON user_group.id = group_member.group_id ' .
|
||||
'WHERE group_member.profile_id = %d ' .
|
||||
'ORDER BY group_member.created DESC ';
|
||||
|
||||
if ($offset>0 && !is_null($limit)) {
|
||||
if ($offset) {
|
||||
if (common_config('db','type') == 'pgsql') {
|
||||
$qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset;
|
||||
} else {
|
||||
$qry .= ' LIMIT ' . $offset . ', ' . $limit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$groups = new User_group();
|
||||
|
||||
$cnt = $groups->query(sprintf($qry, $this->id));
|
||||
|
||||
return $groups;
|
||||
$profile = $this->getProfile();
|
||||
return $profile->getGroups($offset, $limit);
|
||||
}
|
||||
|
||||
function getSubscriptions($offset=0, $limit=null)
|
||||
|
Reference in New Issue
Block a user