From 304ba80a0f39340c9bb4f15b631cbccf5949afbd Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sat, 12 Dec 2009 16:33:38 -0500 Subject: [PATCH] make sure to show repeats correctly when original is deleted --- lib/noticelist.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/noticelist.php b/lib/noticelist.php index 7319a62ea7..aa6ea278c9 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -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; }