make sure to show repeats correctly when original is deleted

This commit is contained in:
Evan Prodromou 2009-12-12 16:33:38 -05:00
parent a5a89f50b8
commit 304ba80a0f

View File

@ -167,8 +167,13 @@ class NoticeListItem extends Widget
{
parent::__construct($out);
if (!empty($notice->repeat_of)) {
$this->notice = Notice::staticGet('id', $notice->repeat_of);
$this->repeat = $notice;
$original = Notice::staticGet('id', $notice->repeat_of);
if (empty($original)) { // could have been deleted
$this->notice = $notice;
} else {
$this->notice = $original;
$this->repeat = $notice;
}
} else {
$this->notice = $notice;
}