summaryrefslogtreecommitdiff
path: root/lib/rssaction.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-11-19 12:00:25 -0500
committerCraig Andrews <candrews@integralblue.com>2009-11-19 12:00:25 -0500
commit4463768baed036b487d473a60b30f0c314ee1673 (patch)
tree5c617bf209239e36929117beda261778815756f9 /lib/rssaction.php
parentad0b9a7115dd0681b003f350bebcd6b6e39ea8b2 (diff)
tobyink's location RDF patch
Diffstat (limited to 'lib/rssaction.php')
-rw-r--r--lib/rssaction.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/rssaction.php b/lib/rssaction.php
index faf6bec7d..cd4c8b51c 100644
--- a/lib/rssaction.php
+++ b/lib/rssaction.php
@@ -244,6 +244,16 @@ class Rss10Action extends Action
$this->element('dc:creator', null, ($profile->fullname) ? $profile->fullname : $profile->nickname);
$this->element('foaf:maker', array('rdf:resource' => $creator_uri));
$this->element('sioc:has_creator', array('rdf:resource' => $creator_uri.'#acct'));
+ $location = $notice->getLocation();
+ if ($location && isset($location->lat) && isset($location->lon)) {
+ $location_uri = $location->getRdfURL();
+ $attrs = array('geo:lat' => $location->lat,
+ 'geo:long' => $location->lon);
+ if (strlen($location_uri)) {
+ $attrs['rdf:resource'] = $location_uri;
+ }
+ $this->element('statusnet:origin', $attrs);
+ }
$this->element('statusnet:postIcon', array('rdf:resource' => $profile->avatarUrl()));
$this->element('cc:licence', array('rdf:resource' => common_config('license', 'url')));
if ($notice->reply_to) {
@@ -354,6 +364,8 @@ class Rss10Action extends Action
'http://rdfs.org/sioc/types#',
'xmlns:rdfs' =>
'http://www.w3.org/2000/01/rdf-schema#',
+ 'xmlns:geo' =>
+ 'http://www.w3.org/2003/01/geo/wgs84_pos#',
'xmlns:statusnet' =>
'http://status.net/ont/',
'xmlns' => 'http://purl.org/rss/1.0/'));