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));
|
self::cacheSet($keypart, implode(',', $ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
$groups = array();
|
return User_group::multiGet('id', $ids);
|
||||||
|
|
||||||
foreach ($ids as $id) {
|
|
||||||
$group = User_group::staticGet('id', $id);
|
|
||||||
if (!empty($group)) {
|
|
||||||
$groups[] = $group;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return new ArrayWrapper($groups);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function isTagged($peopletag)
|
function isTagged($peopletag)
|
||||||
|
@ -33,6 +33,11 @@ class User_group extends Memcached_DataObject
|
|||||||
function staticGet($k,$v=NULL) {
|
function staticGet($k,$v=NULL) {
|
||||||
return Memcached_DataObject::staticGet('User_group',$k,$v);
|
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 */
|
/* the code above is auto generated do not remove the tag below */
|
||||||
###END_AUTOCODE
|
###END_AUTOCODE
|
||||||
|
Loading…
Reference in New Issue
Block a user