summaryrefslogtreecommitdiff
path: root/feed.php
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-01-14 17:40:57 +0100
committerandi <andi@splitbrain.org>2005-01-14 17:40:57 +0100
commit15fae1076f4439c7cd1302494a48e24f707a3020 (patch)
tree87c99f0393d0155fbf853f928f7e6d7ee04778bc /feed.php
parent132bdbfe5a8ce4c57b4ae7d4391e99d05f186d43 (diff)
downloadrpg-15fae1076f4439c7cd1302494a48e24f707a3020.tar.gz
rpg-15fae1076f4439c7cd1302494a48e24f707a3020.tar.bz2
phpdoc comments
darcs-hash:20050114164057-9977f-e4936fde9037c65c3f32c30b31b2b7df35732f3a.gz
Diffstat (limited to 'feed.php')
-rw-r--r--feed.php32
1 files changed, 27 insertions, 5 deletions
diff --git a/feed.php b/feed.php
index 66d694f53..19d6729c2 100644
--- a/feed.php
+++ b/feed.php
@@ -1,4 +1,11 @@
<?php
+/**
+ * XML feed export
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+
ini_set('short_open_tag',"1");
require_once("inc/common.php");
require_once("inc/parser.php");
@@ -54,12 +61,14 @@
header('Content-Type: application/xml; charset='.$lang['encoding']);
print $rss->createFeed($type,$lang['encoding']);
+// ---------------------------------------------------------------- //
-
-/* some functions */
-
+/**
+ * Add recent changed to a feed object
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
function rssRecentChanges(&$rss,$num){
-
$recents = getRecents($num);
foreach(array_keys($recents) as $id){
$desc = cleanDesc(parsedWiki($id));
@@ -84,7 +93,12 @@ function rssRecentChanges(&$rss,$num){
$rss->addItem($item);
}
}
-
+
+/**
+ * Add all pages of a namespace to a feedobject
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
function rssListNamespace(&$rss,$ns){
require_once("inc/search.php");
global $conf;
@@ -108,6 +122,14 @@ function rssListNamespace(&$rss,$ns){
}
}
+/**
+ * Clean description for feed inclusion
+ *
+ * Removes HTML tags and line breaks and trims the text to
+ * 250 chars
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
function cleanDesc($desc){
//remove TOC
$desc = strip_tags($desc);