diff options
Diffstat (limited to 'classes/Notice.php')
-rw-r--r-- | classes/Notice.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/classes/Notice.php b/classes/Notice.php index ebb5022b9..661072156 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -922,13 +922,14 @@ class Notice extends Memcached_DataObject } $groups = $this->saveGroups(); + $profile = $this->getProfile(); foreach ($groups as $group) { $users = $group->getUserMembers(); foreach ($users as $id) { if (!array_key_exists($id, $ni)) { $user = User::staticGet('id', $id); - if (!$user->hasBlocked($notice->profile_id)) { + if (!$user->hasBlocked($profile)) { $ni[$id] = NOTICE_INBOX_SOURCE_GROUP; } } @@ -964,7 +965,10 @@ class Notice extends Memcached_DataObject } if ($cnt >= MAX_BOXCARS) { $inbox = new Notice_inbox(); - $inbox->query($qry); + $result = $inbox->query($qry); + if (PEAR::isError($result)) { + common_log_db_error($inbox, $qry); + } $qry = $qryhdr; $cnt = 0; } @@ -972,7 +976,10 @@ class Notice extends Memcached_DataObject if ($cnt > 0) { $inbox = new Notice_inbox(); - $inbox->query($qry); + $result = $inbox->query($qry); + if (PEAR::isError($result)) { + common_log_db_error($inbox, $qry); + } } return; |