return $ids;
}
+ /**
+ * @param $groups array of Group *objects*
+ * @param $recipients array of profile *ids*
+ */
function whoGets($groups=null, $recipients=null)
{
$c = self::memcache();
return $ids;
}
+ /**
+ * @return array of Group objects
+ */
function saveGroups()
{
// Don't save groups for repeats
return $ids;
}
+ /**
+ * Same calculation as saveGroups but without the saving
+ * @fixme merge the functions
+ * @return array of Group objects
+ */
function getGroups()
{
+ // Don't save groups for repeats
+
+ if (!empty($this->repeat_of)) {
+ return array();
+ }
+
// XXX: cache me
- $ids = array();
+ $groups = array();
$gi = new Group_inbox();
if ($gi->find()) {
while ($gi->fetch()) {
- $ids[] = $gi->group_id;
+ $groups[] = clone($gi);
}
}
$gi->free();
- return $ids;
+ return $groups;
}
function asAtomEntry($namespace=false, $source=false)