summaryrefslogtreecommitdiff
path: root/lib/apiaction.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-03-11 23:05:56 +0000
committerZach Copley <zach@status.net>2010-03-11 23:05:56 +0000
commit023f258b63c2c47b1af74811c39ab274b170e6b0 (patch)
tree560f08f77d41036b21ae33521d98b14787a2bcc8 /lib/apiaction.php
parent512e51105372daf9c85af9284de1463084f03aa9 (diff)
- Output georss xmlns in rss element
- Only output geopoint in rss if one is set
Diffstat (limited to 'lib/apiaction.php')
-rw-r--r--lib/apiaction.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/lib/apiaction.php b/lib/apiaction.php
index e4a1df3d1..fd09f3d42 100644
--- a/lib/apiaction.php
+++ b/lib/apiaction.php
@@ -541,13 +541,12 @@ class ApiAction extends Action
function showGeoRSS($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');
+ if (!empty($geo)) {
+ $this->element(
+ 'georss:point',
+ null,
+ $geo['coordinates'][0] . ' ' . $geo['coordinates'][1]
+ );
}
}
@@ -1138,7 +1137,14 @@ class ApiAction extends Action
function initTwitterRss()
{
$this->startXML();
- $this->elementStart('rss', array('version' => '2.0', 'xmlns:atom'=>'http://www.w3.org/2005/Atom'));
+ $this->elementStart(
+ 'rss',
+ array(
+ 'version' => '2.0',
+ 'xmlns:atom' => 'http://www.w3.org/2005/Atom',
+ 'xmlns:georss' => 'http://www.georss.org/georss'
+ )
+ );
$this->elementStart('channel');
Event::handle('StartApiRss', array($this));
}