summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-12-12 16:33:38 -0500
committerEvan Prodromou <evan@status.net>2009-12-12 16:33:38 -0500
commit304ba80a0f39340c9bb4f15b631cbccf5949afbd (patch)
tree50eecd94d3311b6827a771b40160a1a1cb8b57ff /lib
parenta5a89f50b8e3f9b99d8ea3a7eff378637b149c7f (diff)
make sure to show repeats correctly when original is deleted
Diffstat (limited to 'lib')
-rw-r--r--lib/noticelist.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php
index 7319a62ea..aa6ea278c 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;
}