summaryrefslogtreecommitdiff
path: root/lib/noticelist.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-09-23 09:45:22 -0400
committerEvan Prodromou <evan@status.net>2009-09-23 09:45:22 -0400
commit8284b3cb82f4dec6e0f2bf74dea6e1a3bc7f4eac (patch)
tree09b8c466df2476f9219550464eb73f6ecaa54e1c /lib/noticelist.php
parent2cabfba767ba0d92d34a6ea4e4cf91c7325f3e95 (diff)
parentbef4a8b6ba9e19f2ec629031444279ca76f17bcf (diff)
Merge branch '0.8.x' into 0.9.x
Conflicts: actions/requesttoken.php classes/File.php install.php lib/noticeform.php
Diffstat (limited to 'lib/noticelist.php')
-rw-r--r--lib/noticelist.php18
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php
index ec85e4a5c..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,
@@ -442,7 +450,7 @@ class NoticeListItem extends Widget
{
if (common_logged_in()) {
$reply_url = common_local_url('newnotice',
- array('replyto' => $this->profile->nickname));
+ array('replyto' => $this->profile->nickname, 'inreplyto' => $this->notice->id));
$this->out->elementStart('a', array('href' => $reply_url,
'class' => 'notice_reply',
'title' => _('Reply to this notice')));