summaryrefslogtreecommitdiff
path: root/lib/noticelist.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2009-09-24 18:18:26 -0700
committerZach Copley <zach@status.net>2009-09-24 18:18:26 -0700
commit150cf8c045e8e091a70440d1b833fa19aaf31419 (patch)
tree26aa6f09e89cf1176785f6bcb9b38b4c61d4a7cd /lib/noticelist.php
parented9ba9d945e4f50812022a7489fc8135f4e49846 (diff)
parentb617c608ea0d66451eb2dcd75e1e1c58c179d8e6 (diff)
Merge branch '0.9.x' into refactor-api
* 0.9.x: (88 commits) Left a couple debugging statements in (removed) Output If-Modified-Since header for all RSS 1.0 feeds (again) Revert "move scripts to just before </body>, add event for scripts that need to be in <head>" Implemented join and leave groups api methods implemented etag and last modified Fixed broken Piwik plugin - was not using the supplied site code move scripts to just before </body>, add event for scripts that need to be in <head> some UI fixes Using timeline string instead of title for WindowName because IE doesn't Added JavaScript to initialize the poped Window Some layout and rendering adjustment for Realtime plugin Created addPop() for Realtime plugin and added param to include iconurl move some stuff around for realtime hack around address hack in util.js Add some more realtime feeds Do realtime popup with PHP instead of Javascript JavaScript fixes for IE Revert "Added realtime streams for all and showstream timelines" Revert "Fixed indenting" Revert "Made it slighly more compact with less jQuery selection" ...
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')));