From 25864aea9dd81ebcdb8c7386af3662eda800ccc3 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 24 Feb 2010 00:59:00 +0100 Subject: Using the default abbr class pattern for geo microformats instead of the shorthand that I've proposed at http://microformats.org/wiki/geo-brainstorming#latitude_longitude_shorthand_and_geo_link If anyone wants to pick up on where the discussion was left off or get more implementation support by other sites and software, and be recognized by parsers, I'd be happy to go back to the shorthand. Because you know, it actually makes a lot of sense. --- lib/noticelist.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/noticelist.php') diff --git a/lib/noticelist.php b/lib/noticelist.php index 837cb90fa..dcf17be08 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -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'); } -- cgit v1.2.3-54-g00ecf From c0d13097dd96b3596b43e34e7fff0acd97a838f0 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 24 Feb 2010 15:54:13 -0500 Subject: use Notice::bestUrl() to determine notice url in NoticeListItem::showNoticeLink() --- lib/noticelist.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/noticelist.php') 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)); -- cgit v1.2.3-54-g00ecf