From: Evan Prodromou Date: Sat, 12 Dec 2009 21:33:38 +0000 (-0500) Subject: make sure to show repeats correctly when original is deleted X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=304ba80a0f39340c9bb4f15b631cbccf5949afbd;p=quix0rs-gnu-social.git make sure to show repeats correctly when original is deleted --- 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; }