summaryrefslogtreecommitdiff
path: root/lib/noticelist.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-09-23 09:29:02 -0400
committerEvan Prodromou <evan@status.net>2009-09-23 09:29:02 -0400
commitc01a5b8f2e37fe876507edfccc01126a117d9728 (patch)
tree93090403212c52e75a717730791917b1cc6f8fa0 /lib/noticelist.php
parente80fad7ad9bd0bee6a9cf4cfd1615a9b07277364 (diff)
parentacd5a53257f6d0677d1630e4f6cae80706cdbdba (diff)
Merge branch '0.8.x' of git@gitorious.org:statusnet/mainline into 0.8.x
Diffstat (limited to 'lib/noticelist.php')
-rw-r--r--lib/noticelist.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php
index 6b2bccd97..d4cd3ff6e 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -261,7 +261,7 @@ class NoticeListItem extends Widget
$attrs = array('href' => $this->profile->profileurl,
'class' => 'url');
if (!empty($this->profile->fullname)) {
- $attrs['title'] = $this->profile->fullname . ' (' . $this->profile->nickname . ') ';
+ $attrs['title'] = $this->profile->fullname . ' (' . $this->profile->nickname . ')';
}
$this->out->elementStart('a', $attrs);
$this->showAvatar();
@@ -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,