From: Craig Andrews Date: Fri, 18 Sep 2009 21:37:36 +0000 (-0400) Subject: Show context link if this notice starts a conversation X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6af71f2cd2b2fcacb0f1eb2e0172a300802fe8bc;p=quix0rs-gnu-social.git Show context link if this notice starts a conversation --- diff --git a/lib/noticelist.php b/lib/noticelist.php index 6b2bccd976..507413da76 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,