summaryrefslogtreecommitdiff
path: root/lib/rssaction.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-12-23 14:33:23 -0500
committerEvan Prodromou <evan@prodromou.name>2008-12-23 14:33:23 -0500
commit04ef1ba8eee7a9e2a565d7b4b747ef607665d562 (patch)
treed56ac33bd6bfb8f8641cc9f63b0f6af52b6edfb9 /lib/rssaction.php
parenteb2f9c98ac115ce67e9a740b200c832153ffa05c (diff)
change function headers to K&R style
Another huge change, for PEAR code standards compliance. Function headers have to be in K&R style (opening brace on its own line), instead of having the opening brace on the same line as the function and parameters. So, a little perl magic found all the function definitions and move the opening brace to the next line (properly indented... usually). darcs-hash:20081223193323-84dde-a28e36ecc66672c783c2842d12fc11043c13ab28.gz
Diffstat (limited to 'lib/rssaction.php')
-rw-r--r--lib/rssaction.php39
1 files changed, 26 insertions, 13 deletions
diff --git a/lib/rssaction.php b/lib/rssaction.php
index a21ce3a97..e02e1febb 100644
--- a/lib/rssaction.php
+++ b/lib/rssaction.php
@@ -26,11 +26,13 @@ class Rss10Action extends Action {
# This will contain the details of each feed item's author and be used to generate SIOC data.
var $creators = array();
- function is_readonly() {
+ function is_readonly()
+ {
return true;
}
- function handle($args) {
+ function handle($args)
+ {
parent::handle($args);
$limit = (int) $this->trimmed('limit');
if ($limit == 0) {
@@ -39,26 +41,31 @@ class Rss10Action extends Action {
$this->show_rss($limit);
}
- function init() {
+ function init()
+ {
return true;
}
- function get_notices() {
+ function get_notices()
+ {
return array();
}
- function get_channel() {
+ function get_channel()
+ {
return array('url' => '',
'title' => '',
'link' => '',
'description' => '');
}
- function get_image() {
+ function get_image()
+ {
return null;
}
- function show_rss($limit=0) {
+ function show_rss($limit=0)
+ {
if (!$this->init()) {
return;
@@ -78,7 +85,8 @@ class Rss10Action extends Action {
$this->end_rss();
}
- function show_channel($notices) {
+ function show_channel($notices)
+ {
$channel = $this->get_channel();
$image = $this->get_image();
@@ -106,7 +114,8 @@ class Rss10Action extends Action {
common_element_end('channel');
}
- function show_image() {
+ function show_image()
+ {
$image = $this->get_image();
if ($image) {
$channel = $this->get_channel();
@@ -118,7 +127,8 @@ class Rss10Action extends Action {
}
}
- function show_item($notice) {
+ function show_item($notice)
+ {
$profile = Profile::staticGet($notice->profile_id);
$nurl = common_local_url('shownotice', array('notice' => $notice->id));
$creator_uri = common_profile_uri($profile);
@@ -136,7 +146,8 @@ class Rss10Action extends Action {
$this->creators[$creator_uri] = $profile;
}
- function show_creators() {
+ function show_creators()
+ {
foreach ($this->creators as $uri => $profile) {
$id = $profile->id;
$nickname = $profile->nickname;
@@ -152,7 +163,8 @@ class Rss10Action extends Action {
}
}
- function init_rss() {
+ function init_rss()
+ {
$channel = $this->get_channel();
header('Content-Type: application/rdf+xml');
@@ -183,7 +195,8 @@ class Rss10Action extends Action {
common_element_end('sioc:Site');
}
- function end_rss() {
+ function end_rss()
+ {
common_element_end('rdf:RDF');
}
}