} else {
common_debug('Prepare failed for Action.');
}
- }
-
- $this->flush();
- Event::handle('EndActionExecute', array($this));
+ $this->flush();
+ Event::handle('EndActionExecute', array($this));
+ }
}
/**
*/
function showFeeds()
{
- $feeds = $this->getFeeds();
-
- if ($feeds) {
- foreach ($feeds as $feed) {
- $this->element('link', array('rel' => $feed->rel(),
- 'href' => $feed->url,
- 'type' => $feed->mimeType(),
- 'title' => $feed->title));
- }
+ foreach ($this->getFeeds() as $feed) {
+ $this->element('link', array('rel' => $feed->rel(),
+ 'href' => $feed->url,
+ 'type' => $feed->mimeType(),
+ 'title' => $feed->title));
}
}
function showExportData()
{
$feeds = $this->getFeeds();
- if ($feeds) {
- $fl = new FeedList($this);
- $fl->show($feeds);
+ if (!empty($feeds)) {
+ $fl = new FeedList($this, $feeds);
+ $fl->show();
}
}
* Upstream bug is::
* https://pear.php.net/bugs/bug.php?id=20291
*/
- function booleanintstring($key, $def)
+ function booleanintstring($key, $def=false)
{
return $this->boolean($key, $def) ? '1' : '0';
}
*/
function getFeeds()
{
- return null;
+ return array();
}
/**