use multiGet() for a profile's groups
This commit is contained in:
parent
874f1db389
commit
a3ef80941e
|
@ -273,16 +273,7 @@ class Profile extends Memcached_DataObject
|
|||
self::cacheSet($keypart, implode(',', $ids));
|
||||
}
|
||||
|
||||
$groups = array();
|
||||
|
||||
foreach ($ids as $id) {
|
||||
$group = User_group::staticGet('id', $id);
|
||||
if (!empty($group)) {
|
||||
$groups[] = $group;
|
||||
}
|
||||
}
|
||||
|
||||
return new ArrayWrapper($groups);
|
||||
return User_group::multiGet('id', $ids);
|
||||
}
|
||||
|
||||
function isTagged($peopletag)
|
||||
|
|
|
@ -33,6 +33,11 @@ class User_group extends Memcached_DataObject
|
|||
function staticGet($k,$v=NULL) {
|
||||
return Memcached_DataObject::staticGet('User_group',$k,$v);
|
||||
}
|
||||
|
||||
function multiGet($keyCol, $keyVals, $skipNulls=true)
|
||||
{
|
||||
return parent::multiGet('User_group', $keyCol, $keyVals, $skipNulls);
|
||||
}
|
||||
|
||||
/* the code above is auto generated do not remove the tag below */
|
||||
###END_AUTOCODE
|
||||
|
|
Loading…
Reference in New Issue
Block a user