summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-02-24 15:54:13 -0500
committerEvan Prodromou <evan@status.net>2010-02-24 15:54:13 -0500
commitc0d13097dd96b3596b43e34e7fff0acd97a838f0 (patch)
tree3f29e93a43dad1a2396fea0663406f95afe5f208 /lib
parent269d567d9440e3c943f67aad428efce9d112385c (diff)
use Notice::bestUrl() to determine notice url in NoticeListItem::showNoticeLink()
Diffstat (limited to 'lib')
-rw-r--r--lib/noticelist.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php
index dcf17be08..28a563d87 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -380,12 +380,12 @@ class NoticeListItem extends Widget
function showNoticeLink()
{
- if($this->notice->is_local == Notice::LOCAL_PUBLIC || $this->notice->is_local == Notice::LOCAL_NONPUBLIC){
- $noticeurl = common_local_url('shownotice',
- array('notice' => $this->notice->id));
- }else{
- $noticeurl = $this->notice->uri;
- }
+ $noticeurl = $this->notice->bestUrl();
+
+ // above should always return an URL
+
+ assert(!empty($noticeurl));
+
$this->out->elementStart('a', array('rel' => 'bookmark',
'class' => 'timestamp',
'href' => $noticeurl));