[dokuwiki] quick - syndication question - is specific $ID possible/practical?

  • From: Robin Getz <rgetz@xxxxxxxxxxxxxxxxxxxx>
  • To: "dokuwiki@xxxxxxxxxxxxx" <dokuwiki@xxxxxxxxxxxxx>
  • Date: Thu, 6 Jan 2011 16:33:43 -0500

Hi.

I can see from http://www.dokuwiki.org/syndication, that I can look at the 
entire site, or specific namespace, but I couldn't figure out how to set it 
up for a specific page...

From looking at feed.php - it doesn't seem to be possible today.

I looked, and determined that it is since:

inc/changelog.php:_handleRecent() includes:

    // filter namespace
    if (($ns) && (strpos($recent['id'],$ns.':') !== 0)) return false;

if I'm looking for a specific page "foo:bar", nothing will match "foo:bar:"

If I change it to:

diff --git a/inc/changelog.php b/inc/changelog.php
index bb00df7..38bdefa 100644
--- a/inc/changelog.php
+++ b/inc/changelog.php
@@ -263,7 +263,7 @@ function _handleRecent($line,$ns,$flags,&$seen){
     if(isHiddenPage($recent['id'])) return false;

     // filter namespace
-    if (($ns) && (strpos($recent['id'],$ns.':') !== 0)) return false;
+    if (($ns) && (strpos($recent['id'],$ns) !== 0)) return false;

It does work - (I can subscribe to specific pages) - but I know that is wrong, 
since it will also match "foo:bar*" --  I also wasn't sure what the expected 
results were for foo/bar.txt (the "bar" page), and /foo/bar/baz.txt 
(the "bar" namespace).

Any thoughts?


Thanks
-Robin
--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: