From: Evan Prodromou Date: Wed, 24 Feb 2010 20:54:13 +0000 (-0500) Subject: use Notice::bestUrl() to determine notice url in NoticeListItem::showNoticeLink() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c0d13097dd96b3596b43e34e7fff0acd97a838f0;p=quix0rs-gnu-social.git use Notice::bestUrl() to determine notice url in NoticeListItem::showNoticeLink() --- diff --git a/lib/noticelist.php b/lib/noticelist.php index dcf17be08c..28a563d875 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));