summaryrefslogtreecommitdiff
path: root/lib/noticelist.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-24 15:47:51 -0800
committerBrion Vibber <brion@pobox.com>2010-02-24 15:47:51 -0800
commit59be4b8cae992476628b23c2976d335e4f704c89 (patch)
treea1e94f2b11a5e640bf55f6977576fdca237f323f /lib/noticelist.php
parent2d9d444b05e29105082d3a443b8b71de6498b7e9 (diff)
parente04f55630473f5f8b17554d14cfd047b93af8609 (diff)
Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'lib/noticelist.php')
-rw-r--r--lib/noticelist.php21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php
index 837cb90fa..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));
@@ -438,14 +438,15 @@ class NoticeListItem extends Widget
$this->out->text(_('at'));
$this->out->text(' ');
if (empty($url)) {
- $this->out->element('span', array('class' => 'geo',
+ $this->out->element('abbr', array('class' => 'geo',
'title' => $latlon),
$name);
} else {
- $this->out->element('a', array('class' => 'geo',
- 'title' => $latlon,
- 'href' => $url),
+ $this->out->elementStart('a', array('href' => $url));
+ $this->out->element('abbr', array('class' => 'geo',
+ 'title' => $latlon),
$name);
+ $this->out->elementEnd('a');
}
$this->out->elementEnd('span');
}