Fix regression in group posting: bug introduced in commit 1319002e15. Need to use actual profile object rather than an id on a variable that doesn't exist when checking blocks :D

This commit is contained in:
Brion Vibber 2009-11-27 14:52:58 -08:00
parent e85e47b509
commit 2b8a3e3511

View File

@ -922,13 +922,14 @@ class Notice extends Memcached_DataObject
} }
$groups = $this->saveGroups(); $groups = $this->saveGroups();
$profile = $this->getProfile();
foreach ($groups as $group) { foreach ($groups as $group) {
$users = $group->getUserMembers(); $users = $group->getUserMembers();
foreach ($users as $id) { foreach ($users as $id) {
if (!array_key_exists($id, $ni)) { if (!array_key_exists($id, $ni)) {
$user = User::staticGet('id', $id); $user = User::staticGet('id', $id);
if (!$user->hasBlocked($notice->profile_id)) { if (!$user->hasBlocked($profile)) {
$ni[$id] = NOTICE_INBOX_SOURCE_GROUP; $ni[$id] = NOTICE_INBOX_SOURCE_GROUP;
} }
} }