summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/apiaction.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/apiaction.php b/lib/apiaction.php
index b90607862..e6aaf9316 100644
--- a/lib/apiaction.php
+++ b/lib/apiaction.php
@@ -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)) {