diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-09-18 17:37:36 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-09-18 17:37:59 -0400 |
commit | 6af71f2cd2b2fcacb0f1eb2e0172a300802fe8bc (patch) | |
tree | 6c1d6c6ebe85dd8b18dadd3d098b962078096ee8 /lib | |
parent | fc0f871bfe653a635d5e86986f2c8510434f74c3 (diff) |
Show context link if this notice starts a conversation
Diffstat (limited to 'lib')
-rw-r--r-- | lib/noticelist.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php index 6b2bccd97..507413da7 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -418,9 +418,17 @@ class NoticeListItem extends Widget function showContext() { - // XXX: also show context if there are replies to this notice - if (!empty($this->notice->conversation) - && $this->notice->conversation != $this->notice->id) { + $hasConversation = false; + if( !empty($this->notice->conversation) + && $this->notice->conversation != $this->notice->id){ + $hasConversation = true; + }else{ + $conversation = Notice::conversationStream($this->notice->id, 1, 1); + if($conversation->N > 0){ + $hasConversation = true; + } + } + if ($hasConversation){ $convurl = common_local_url('conversation', array('id' => $this->notice->conversation)); $this->out->element('a', array('href' => $convurl.'#notice-'.$this->notice->id, |