From 79b608ce5502b7d28087a42cab5c09927c117c8f Mon Sep 17 00:00:00 2001
From: andi <andi@splitbrain.org>
Date: Sat, 26 Feb 2005 14:33:25 +0100
Subject: [PATCH] some feed tuning

darcs-hash:20050226133325-9977f-001fc0ae4081b812bdef84350074624bb530f6f7.gz
---
 doku.php |  6 +++---
 feed.php | 14 +++++++++++---
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/doku.php b/doku.php
index f67d4789f..0d6c823ef 100644
--- a/doku.php
+++ b/doku.php
@@ -51,6 +51,9 @@
     html_debug();
     exit;
   }
+  
+  //make infos about the selected page available
+  $INFO = pageinfo();
 
   //already logged in?
   if($_SERVER['REMOTE_USER'] && $ACT=='login') $ACT='show';
@@ -111,9 +114,6 @@
     }
   }
 
-  //make infos about current page available
-  $INFO = pageinfo();
-
   //Editing: check if locked by anyone - if not lock for my self
   if(($ACT == 'edit' || $ACT == $lang['btn_preview']) && $INFO['editable']){
     $lockedby = checklock($ID);
diff --git a/feed.php b/feed.php
index d949345a9..bf9dd486a 100644
--- a/feed.php
+++ b/feed.php
@@ -43,16 +43,22 @@
   //some defaults for the feed
   $CACHEGROUP = 'feed';
   $conf['typography'] = false;
-#  $conf['canonical']  = true;
+  $conf['canonical']  = true;
   $parser['toc']      = false;
 
-  $rss = new UniversalFeedCreator();
+#  $rss = new UniversalFeedCreator();
   $rss = new DokuWikiFeedCreator();
   $rss->title = $conf['title'];
   $rss->link  = DOKU_URL;
   $rss->syndicationURL = DOKU_URL.'/feed.php';
   $rss->cssStyleSheet  = DOKU_URL.'/feed.css';
 
+  $image = new FeedImage();
+  $image->title = $conf['title'];
+  $image->url = DOKU_URL."images/favicon.ico";
+  $image->link = DOKU_URL;
+  $rss->image = $image;
+
   if($mode == 'list'){
     rssListNamespace($rss,$ns);
   }else{
@@ -90,8 +96,10 @@ function rssRecentChanges(&$rss,$num){
       $item->author = 'anonymous@';
     }
     $item->author  .= $recents[$id]['ip'];
-    
     $rss->addItem($item);
+
+    //this can take some time if a lot of recaching has to be done
+    @set_time_limit(30); //reset execution time
   }
 }
 
-- 
GitLab