use Notice::bestUrl() to determine notice url in NoticeListItem::showNoticeLink()

This commit is contained in:
Evan Prodromou 2010-02-24 15:54:13 -05:00
parent 269d567d94
commit c0d13097dd

View File

@ -380,12 +380,12 @@ class NoticeListItem extends Widget
function showNoticeLink() function showNoticeLink()
{ {
if($this->notice->is_local == Notice::LOCAL_PUBLIC || $this->notice->is_local == Notice::LOCAL_NONPUBLIC){ $noticeurl = $this->notice->bestUrl();
$noticeurl = common_local_url('shownotice',
array('notice' => $this->notice->id)); // above should always return an URL
}else{
$noticeurl = $this->notice->uri; assert(!empty($noticeurl));
}
$this->out->elementStart('a', array('rel' => 'bookmark', $this->out->elementStart('a', array('rel' => 'bookmark',
'class' => 'timestamp', 'class' => 'timestamp',
'href' => $noticeurl)); 'href' => $noticeurl));