Merge commit 'origin/testing' into 0.9.x

Conflicts:
	lib/action.php
	lib/adminpanelaction.php
This commit is contained in:
Brion Vibber
2010-03-04 06:07:28 -08:00
65 changed files with 2414 additions and 762 deletions

View File

@@ -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)