InboxNoticeStream::getNotices() no longer returns an ArrayWrapper;
just fetch notices normally via $notice->fetch(), so that
we can actually get the top notice-ID and update email_summary_status
accordingly--and not mail about the same notices repeatedly.
- if ($notice instanceof ArrayWrapper) {
- $new_top = $notice->_items[0]->id;
+ if ($notice->fetch()) {
+ $new_top = $notice->id;
}
// TRANS: Subject for e-mail.
}
// TRANS: Subject for e-mail.
$out->elementStart('table', array('width' => '550px',
'style' => 'border: none; border-collapse: collapse;', 'cellpadding' => '6'));
$out->elementStart('table', array('width' => '550px',
'style' => 'border: none; border-collapse: collapse;', 'cellpadding' => '6'));
- while ($notice->fetch()) {
$profile = Profile::getKV('id', $notice->profile_id);
if (empty($profile)) {
$profile = Profile::getKV('id', $notice->profile_id);
if (empty($profile)) {
$out->elementEnd('div');
$out->elementEnd('td');
$out->elementEnd('tr');
$out->elementEnd('div');
$out->elementEnd('td');
$out->elementEnd('tr');
+ } while ($notice->fetch());
$out->elementEnd('table');
$out->elementEnd('table');