<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -7,8 +7,8 @@
  * @author     Esther Brunner &lt;wikidesign@gmail.com&gt;
  */
 
-if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../../').'/');
-if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
+if (!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../../').'/');
+if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
 require_once(DOKU_INC.'inc/init.php');
 require_once(DOKU_INC.'inc/common.php');
 require_once(DOKU_INC.'inc/events.php');
@@ -30,26 +30,26 @@ $type   = $_REQUEST['type'];
 
 if ($type == '') $type = $conf['rss_type'];
 
-switch ($type){
-  case 'rss':
-    $type = 'RSS0.91';
-    $mime = 'text/xml';
-    break;
-  case 'rss2':
-    $type = 'RSS2.0';
-    $mime = 'text/xml';
-    break;
-  case 'atom':
-    $type = 'ATOM0.3';
-    $mime = 'application/xml';
-    break;
-  case 'atom1':
-    $type = 'ATOM1.0';
-    $mime = 'application/atom+xml';
-    break;
-  default:
-    $type = 'RSS1.0';
-    $mime = 'application/xml';
+switch ($type) {
+    case 'rss':
+        $type = 'RSS0.91';
+        $mime = 'text/xml';
+        break;
+    case 'rss2':
+        $type = 'RSS2.0';
+        $mime = 'text/xml';
+        break;
+    case 'atom':
+        $type = 'ATOM0.3';
+        $mime = 'application/xml';
+        break;
+    case 'atom1':
+        $type = 'ATOM1.0';
+        $mime = 'application/atom+xml';
+        break;
+    default:
+        $type = 'RSS1.0';
+        $mime = 'application/xml';
 }
 
 // the feed is dynamic - we need a cache for each combo
@@ -57,9 +57,9 @@ switch ($type){
 $cache = getCacheName($plugin.$fn.$ns.$num.$other.$type.$_SERVER['REMOTE_USER'],'.feed');
 $cmod = @filemtime($cache); // 0 if not exists
 if ($cmod &amp;&amp; (@filemtime(DOKU_CONF.'local.php') &gt; $cmod
-  || @filemtime(DOKU_CONF.'dokuwiki.php') &gt; $cmod)){
-  // ignore cache if feed prefs may have changed
-  $cmod = 0;
+            || @filemtime(DOKU_CONF.'dokuwiki.php') &gt; $cmod)) {
+    // ignore cache if feed prefs may have changed
+    $cmod = 0;
 }
 
 // check cacheage and deliver if nothing has changed since last
@@ -67,14 +67,13 @@ if ($cmod &amp;&amp; (@filemtime(DOKU_CONF.'local.php') &gt; $cmod
 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
 header('Pragma: public');
 header('Content-Type: application/xml; charset=utf-8');
-if ($cmod &amp;&amp;
-  (($cmod + $conf['rss_update'] &gt; time()) || ($cmod &gt; @filemtime($conf['changelog'])))){
-  http_conditionalRequest($cmod);
-  if($conf['allowdebug']) header(&quot;X-CacheUsed: $cache&quot;);
-  print io_readFile($cache);
-  exit;
+if ($cmod &amp;&amp; (($cmod + $conf['rss_update'] &gt; time()) || ($cmod &gt; @filemtime($conf['changelog'])))) {
+    http_conditionalRequest($cmod);
+    if ($conf['allowdebug']) header(&quot;X-CacheUsed: $cache&quot;);
+    print io_readFile($cache);
+    exit;
 } else {
-  http_conditionalRequest(time());
+    http_conditionalRequest(time());
 }
 
 // create new feed
@@ -111,51 +110,49 @@ print $feed;
  * @author Andreas Gohr &lt;andi@splitbrain.org&gt;
  * @author Esther Brunner &lt;wikidesign@gmail.com&gt;
  */
-function feed_getPages(&amp;$rss, &amp;$po, $ns, $num, $fn){
-  global $conf;
-  
-  if ((!$num) || (!is_numeric($num))) $num = $conf['recent'];
-  
-  // get the pages for our namespace
-  $pages = $po-&gt;$fn($ns, $num);
-  if (!$pages) return false;
-   
-  foreach ($pages as $page){
-    $item = new FeedItem();
-    
-    list($id, $hash) = explode('#', $page['id'], 2);
-    $meta = p_get_metadata($id);
-
-    // title
-    if ($page['title']) $item-&gt;title = $page['title'];
-    elseif ($meta['title']) $item-&gt;title = $meta['title'];
-    else $item-&gt;title = ucwords($id);
-
-    // link
-    $item-&gt;link = wl($page['id'], '', true, '&amp;') . '#' . $page['anchor'];
-    
-    // description
-    if ($page['desc']) $item-&gt;description = htmlspecialchars($page['desc']);
-    else $item-&gt;description = htmlspecialchars($meta['description']['abstract']);
-    
-    // date
-    $item-&gt;date = date('r', $page['date']);
-    
-    // category
-    if ($page['cat']){
-       $item-&gt;category = $page['cat'];
-    } elseif ($meta['subject']){
-      if (is_array($meta['subject'])) $item-&gt;category = $meta['subject'][0];
-      else $item-&gt;category = $meta['subject'];
+function feed_getPages(&amp;$rss, &amp;$po, $ns, $num, $fn) {
+    global $conf;
+
+    if ((!$num) || (!is_numeric($num))) $num = $conf['recent'];
+
+    // get the pages for our namespace
+    $pages = $po-&gt;$fn($ns, $num);
+    if (!$pages) return false;
+
+    foreach ($pages as $page) {
+        $item = new FeedItem();
+
+        list($id, $hash) = explode('#', $page['id'], 2);
+        $meta = p_get_metadata($id);
+
+        // title
+        if ($page['title']) $item-&gt;title = $page['title'];
+        elseif ($meta['title']) $item-&gt;title = $meta['title'];
+        else $item-&gt;title = ucwords($id);
+
+        // link
+        $item-&gt;link = wl($page['id'], '', true, '&amp;') . '#' . $page['anchor'];
+
+        // description
+        if ($page['desc']) $item-&gt;description = htmlspecialchars($page['desc']);
+        else $item-&gt;description = htmlspecialchars($meta['description']['abstract']);
+
+        // date
+        $item-&gt;date = date('r', $page['date']);
+
+        // category
+        if ($page['cat']) {
+            $item-&gt;category = $page['cat'];
+        } elseif ($meta['subject']) {
+            if (is_array($meta['subject'])) $item-&gt;category = $meta['subject'][0];
+            else $item-&gt;category = $meta['subject'];
+        }
+
+        // creator
+        if ($page['user']) $item-&gt;author = $page['user'];
+        else $item-&gt;author = $meta['creator'];
+
+        $rss-&gt;addItem($item);
     }
-    
-    // creator
-    if ($page['user']) $item-&gt;author = $page['user'];
-    else $item-&gt;author = $meta['creator'];
-
-    $rss-&gt;addItem($item);
-  }
-  
 }
-
-//Setup VIM: ex: et ts=2 enc=utf-8 :
+//vim:ts=4:sw=4:et:enc=utf-8:</diff>
      <filename>feed.php</filename>
    </modified>
    <modified>
      <diff>@@ -14,106 +14,104 @@ require_once(DOKU_PLUGIN.'syntax.php');
 
 class syntax_plugin_feed extends DokuWiki_Syntax_Plugin {
 
-  /**
-   * To support feeds in your plugin, add an array here
-   *
-   * The array key is important: $plugin-&gt;getLang($key) is used for the feed title and a
-   * function 'get'.$key (for example getTopic for 'topic') must exist in your helper.php!
-   *
-   * The first param should eigther be 'id' or 'ns' as it will go through cleanID()
-   *
-   * Unless the second parameter is 'num', your plugin will have to handle it on its own
-   */
-  function _registeredFeeds(){
-    $feeds = array(
-      'blog'     =&gt; array('plugin' =&gt; 'blog', 'params' =&gt; array('ns', 'num')),
-      'comments' =&gt; array('plugin' =&gt; 'discussion', 'params' =&gt; array('ns', 'num')),
-      'threads'  =&gt; array('plugin' =&gt; 'discussion', 'params' =&gt; array('ns', 'num')),
-      'editor'   =&gt; array('plugin' =&gt; 'editor', 'params' =&gt; array('ns', 'user')),
-      'topic'    =&gt; array('plugin' =&gt; 'tag', 'params' =&gt; array('ns', 'tag')),
-      'tasks'    =&gt; array('plugin' =&gt; 'task', 'params' =&gt; array('ns', 'filter')),
-    );
-    foreach ($feeds as $key =&gt; $value){
-      if (!@file_exists(DOKU_PLUGIN.$value['plugin'].'/helper.php')) unset($feeds[$key]);
+    /**
+     * To support feeds in your plugin, add an array here
+     *
+     * The array key is important: $plugin-&gt;getLang($key) is used for the feed title and a
+     * function 'get'.$key (for example getTopic for 'topic') must exist in your helper.php!
+     *
+     * The first param should eigther be 'id' or 'ns' as it will go through cleanID()
+     *
+     * Unless the second parameter is 'num', your plugin will have to handle it on its own
+     */
+    function _registeredFeeds() {
+        $feeds = array(
+                'blog'     =&gt; array('plugin' =&gt; 'blog', 'params' =&gt; array('ns', 'num')),
+                'comments' =&gt; array('plugin' =&gt; 'discussion', 'params' =&gt; array('ns', 'num')),
+                'threads'  =&gt; array('plugin' =&gt; 'discussion', 'params' =&gt; array('ns', 'num')),
+                'editor'   =&gt; array('plugin' =&gt; 'editor', 'params' =&gt; array('ns', 'user')),
+                'topic'    =&gt; array('plugin' =&gt; 'tag', 'params' =&gt; array('ns', 'tag')),
+                'tasks'    =&gt; array('plugin' =&gt; 'task', 'params' =&gt; array('ns', 'filter')),
+                );
+        foreach ($feeds as $key =&gt; $value) {
+            if (!@file_exists(DOKU_PLUGIN.$value['plugin'].'/helper.php')) unset($feeds[$key]);
+        }
+        return $feeds;
     }
-    return $feeds;
-  }
-
-  function getInfo(){
-    return array(
-      'author' =&gt; 'Gina H&#228;u&#223;ge, Michael Klier, Esther Brunner',
-      'email'  =&gt; 'dokuwiki@chimeric.de',
-      'date'   =&gt; '2007-01-16',
-      'name'   =&gt; 'Feed Plugin',
-      'desc'   =&gt; 'Generates feeds for other plugins',
-      'url'    =&gt; 'http://wiki.splitbrain.org/plugin:feed',
-    );
-  }
-
-  function getType(){ return 'substition'; }
-  function getSort(){ return 308; }
-  
-  function connectTo($mode){
-    $this-&gt;Lexer-&gt;addSpecialPattern('\{\{\w+?feed&gt;.+?\}\}', $mode, 'plugin_feed');
-  }
-
-  function handle($match, $state, $pos, &amp;$handler){
-    global $ID;
-    
-    $match = substr($match, 2, -2); // strip markup
-    list($feed, $data) = explode('&gt;', $match, 2);
-    $feed = substr($feed, 0, -4);
-    list($params, $title) = explode('|', $data, 2);
-    list($param1, $param2) = explode('?', $params, 2);
-    
-    if (($param1 == '*') || ($param1 == ':')) $param1 = '';
-    elseif ($param1 == '.') $param1 = getNS($ID);
-    else $param1 = cleanID($param1);
-
-    return array($feed, $param1, trim($param2), trim($title));
-  }
-
-  function render($mode, &amp;$renderer, $data){
-    list($feed, $p1, $p2, $title) = $data;
-    
-    $feeds = $this-&gt;_registeredFeeds();
-    if (!isset($feeds[$feed])){
-      msg('Unknown plugin feed '.hsc($feed).'.', -1);
-      return false;
+
+    function getInfo() {
+        return array(
+                'author' =&gt; 'Gina H&#228;u&#223;ge, Michael Klier, Esther Brunner',
+                'email'  =&gt; 'dokuwiki@chimeric.de',
+                'date'   =&gt; '2007-01-16',
+                'name'   =&gt; 'Feed Plugin',
+                'desc'   =&gt; 'Generates feeds for other plugins',
+                'url'    =&gt; 'http://wiki.splitbrain.org/plugin:feed',
+                );
     }
-    
-    $plugin = $feeds[$feed]['plugin'];
-    if (plugin_isdisabled($plugin) || (!$po =&amp; plugin_load('helper', $plugin))){
-      msg('Missing or invalid helper plugin for '.hsc($feed).'.', -1);
-      return false;
+
+    function getType() { return 'substition'; }
+    function getSort() { return 308; }
+
+    function connectTo($mode) {
+        $this-&gt;Lexer-&gt;addSpecialPattern('\{\{\w+?feed&gt;.+?\}\}', $mode, 'plugin_feed');
     }
-    
-    $fn = 'get'.ucwords($feed);
-        
-    if (!$title) $title = ucwords(str_replace(array('_', ':'), array(' ', ': '), $p1));
-    if (!$title) $title = ucwords(str_replace('_', ' ', $p2));
-  
-    if($mode == 'xhtml'){
-      $url = DOKU_BASE.'lib/plugins/feed/feed.php?plugin='.$plugin.'&amp;amp;fn='.$fn.
-        '&amp;amp;'.$feeds[$feed]['params'][0].'='.urlencode($p1);
-      if ($p2) $url .= '&amp;amp;'.$feeds[$feed]['params'][1].'='.urlencode($p2);
-      $url .= '&amp;amp;title='.urlencode($po-&gt;getLang($feed));
-      $title = hsc($title);
-      
-      $renderer-&gt;doc .= '&lt;a href=&quot;'.$url.'&quot; class=&quot;feed&quot; rel=&quot;nofollow&quot;'.
-        ' type=&quot;application/rss+xml&quot; title=&quot;'.$title.'&quot;&gt;'.$title.'&lt;/a&gt;';
-                
-      return true;
-    
-    // for metadata renderer
-    } elseif ($mode == 'metadata'){
-      if ($renderer-&gt;capture) $renderer-&gt;doc .= $title;
-      
-      return true;
+
+    function handle($match, $state, $pos, &amp;$handler) {
+        global $ID;
+
+        $match = substr($match, 2, -2); // strip markup
+        list($feed, $data) = explode('&gt;', $match, 2);
+        $feed = substr($feed, 0, -4);
+        list($params, $title) = explode('|', $data, 2);
+        list($param1, $param2) = explode('?', $params, 2);
+
+        if (($param1 == '*') || ($param1 == ':')) $param1 = '';
+        elseif ($param1 == '.') $param1 = getNS($ID);
+        else $param1 = cleanID($param1);
+
+        return array($feed, $param1, trim($param2), trim($title));
     }
-    return false;
-  }
-        
-}
 
-//Setup VIM: ex: et ts=4 enc=utf-8 :
+    function render($mode, &amp;$renderer, $data) {
+        list($feed, $p1, $p2, $title) = $data;
+
+        $feeds = $this-&gt;_registeredFeeds();
+        if (!isset($feeds[$feed])) {
+            msg('Unknown plugin feed '.hsc($feed).'.', -1);
+            return false;
+        }
+
+        $plugin = $feeds[$feed]['plugin'];
+        if (plugin_isdisabled($plugin) || (!$po =&amp; plugin_load('helper', $plugin))) {
+            msg('Missing or invalid helper plugin for '.hsc($feed).'.', -1);
+            return false;
+        }
+
+        $fn = 'get'.ucwords($feed);
+
+        if (!$title) $title = ucwords(str_replace(array('_', ':'), array(' ', ': '), $p1));
+        if (!$title) $title = ucwords(str_replace('_', ' ', $p2));
+
+        if ($mode == 'xhtml') {
+            $url = DOKU_BASE.'lib/plugins/feed/feed.php?plugin='.$plugin.'&amp;amp;fn='.$fn.
+                '&amp;amp;'.$feeds[$feed]['params'][0].'='.urlencode($p1);
+            if ($p2) $url .= '&amp;amp;'.$feeds[$feed]['params'][1].'='.urlencode($p2);
+            $url .= '&amp;amp;title='.urlencode($po-&gt;getLang($feed));
+            $title = hsc($title);
+
+            $renderer-&gt;doc .= '&lt;a href=&quot;'.$url.'&quot; class=&quot;feed&quot; rel=&quot;nofollow&quot;'.
+                ' type=&quot;application/rss+xml&quot; title=&quot;'.$title.'&quot;&gt;'.$title.'&lt;/a&gt;';
+
+            return true;
+
+            // for metadata renderer
+        } elseif ($mode == 'metadata') {
+            if ($renderer-&gt;capture) $renderer-&gt;doc .= $title;
+
+            return true;
+        }
+        return false;
+    }
+}
+//vim:ts=4:sw=4:et:enc=utf-8:</diff>
      <filename>syntax.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>158f4e262d92947fe1900de174d52261602c1a93</id>
    </parent>
  </parents>
  <author>
    <name>Michael Klier</name>
    <login>chimeric</login>
    <email>chi@chimeric.de</email>
  </author>
  <url>http://github.com/dokufreaks/plugin-feed/commit/9bcd6b11f8f7fe1df84204c26038afe7f63fc4e5</url>
  <id>9bcd6b11f8f7fe1df84204c26038afe7f63fc4e5</id>
  <committed-date>2008-06-07T14:23:49-07:00</committed-date>
  <authored-date>2008-06-07T14:23:49-07:00</authored-date>
  <message>fixed code style

darcs-hash:20080607212349-23886-e158e6c1d4cb95598b29855818532a112de261e2.gz</message>
  <tree>61ed408cbe3b7e003f16c002eda7e314c993ca5d</tree>
  <committer>
    <name>Michael Klier</name>
    <login>chimeric</login>
    <email>chi@chimeric.de</email>
  </committer>
</commit>
