]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
use Notice::bestUrl() to determine notice url in NoticeListItem::showNoticeLink()
authorEvan Prodromou <evan@status.net>
Wed, 24 Feb 2010 20:54:13 +0000 (15:54 -0500)
committerEvan Prodromou <evan@status.net>
Wed, 24 Feb 2010 20:54:13 +0000 (15:54 -0500)
lib/noticelist.php

index dcf17be08c5423ab253a021f6fb48999beda5d95..28a563d875aff8c2e7ce621ba204ada667f9ee77 100644 (file)
@@ -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));