Commit 3dc84dd0 authored by Zach Copley's avatar Zach Copley

Output enclosing geo elements and GeoRSS xmlns in XML timelines

parent 13556e7b
......@@ -491,7 +491,7 @@ class ApiAction extends Action
$this->showXmlAttachments($twitter_status['attachments']);
break;
case 'geo':
$this->showGeoRSS($value);
$this->showGeoXML($value);
break;
case 'retweeted_status':
$this->showTwitterXmlStatus($value, 'retweeted_status');
......@@ -539,6 +539,18 @@ class ApiAction extends Action
}
}
function showGeoXML($geo)
{
if (empty($geo)) {
// empty geo element
$this->element('geo');
} else {
$this->elementStart('geo', array('xmlns:georss' => 'http://www.georss.org/georss'));
$this->element('georss:point', null, $geo['coordinates'][0] . ' ' . $geo['coordinates'][1]);
$this->elementEnd('geo');
}
}
function showGeoRSS($geo)
{
if (!empty($geo)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment