- Output georss xmlns in rss element
- Only output geopoint in rss if one is set
This commit is contained in:
parent
512e511053
commit
023f258b63
|
@ -541,13 +541,12 @@ class ApiAction extends Action
|
||||||
|
|
||||||
function showGeoRSS($geo)
|
function showGeoRSS($geo)
|
||||||
{
|
{
|
||||||
if (empty($geo)) {
|
if (!empty($geo)) {
|
||||||
// empty geo element
|
$this->element(
|
||||||
$this->element('geo');
|
'georss:point',
|
||||||
} else {
|
null,
|
||||||
$this->elementStart('geo', array('xmlns:georss' => 'http://www.georss.org/georss'));
|
$geo['coordinates'][0] . ' ' . $geo['coordinates'][1]
|
||||||
$this->element('georss:point', null, $geo['coordinates'][0] . ' ' . $geo['coordinates'][1]);
|
);
|
||||||
$this->elementEnd('geo');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1138,7 +1137,14 @@ class ApiAction extends Action
|
||||||
function initTwitterRss()
|
function initTwitterRss()
|
||||||
{
|
{
|
||||||
$this->startXML();
|
$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');
|
$this->elementStart('channel');
|
||||||
Event::handle('StartApiRss', array($this));
|
Event::handle('StartApiRss', array($this));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user