diff options
author | Sarven Capadisli <csarven@status.net> | 2009-09-20 12:55:34 +0200 |
---|---|---|
committer | Sarven Capadisli <csarven@status.net> | 2009-09-20 12:55:34 +0200 |
commit | 0fa2bbe581060b133fbfc48958121533aa199193 (patch) | |
tree | 8cb994bd4917023aa63ec13c62f7cd1491251e32 /lib | |
parent | 4b7881c64e741d7b82f1d65bd9651148692cf1d4 (diff) | |
parent | cf8944526ec56dd1a3522d6eced65a4d1369c321 (diff) |
Merge branch '0.8.x' of git@gitorious.org:statusnet/mainline into 0.8.x
Diffstat (limited to 'lib')
-rw-r--r-- | lib/noticelist.php | 14 | ||||
-rw-r--r-- | lib/router.php | 6 |
2 files changed, 14 insertions, 6 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php index 336457b45..d4cd3ff6e 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, diff --git a/lib/router.php b/lib/router.php index 0505c9942..5529e60ac 100644 --- a/lib/router.php +++ b/lib/router.php @@ -272,12 +272,12 @@ class Router $m->connect('api/statuses/:method', array('action' => 'api', 'apiaction' => 'statuses'), - array('method' => '(public_timeline|friends_timeline|user_timeline|update|replies|mentions|show|friends|followers|featured)(\.(atom|rss|xml|json))?')); + array('method' => '(public_timeline|home_timeline|friends_timeline|user_timeline|update|replies|mentions|show|friends|followers|featured)(\.(atom|rss|xml|json))?')); $m->connect('api/statuses/:method/:argument', array('action' => 'api', 'apiaction' => 'statuses'), - array('method' => '(|user_timeline|friends_timeline|replies|mentions|show|destroy|friends|followers)')); + array('method' => '(user_timeline|home_timeline|friends_timeline|replies|mentions|show|destroy|friends|followers)')); // users @@ -436,7 +436,7 @@ class Router $m->connect('api/statuses/:method/:argument', array('action' => 'api', 'apiaction' => 'statuses'), - array('method' => '(|user_timeline|friends_timeline|replies|mentions|show|destroy|friends|followers)')); + array('method' => '(user_timeline|home_timeline|friends_timeline|replies|mentions|show|destroy|friends|followers)')); $m->connect('api/statusnet/groups/:method/:argument', array('action' => 'api', |