From a1716312b3d267c93299958009452d9a20969f88 Mon Sep 17 00:00:00 2001
From: Marc Mayfield <celf@intelf.com>
Date: Wed, 1 Nov 2006 03:33:13 +0100
Subject: [PATCH] rss_summary_config

Add a configuration option to control whether or not the edit/revision summary is
displayed with the title of RSS feeds. The default is to show the summary, the same as
DokuWiki did prior to this addition.

darcs-hash:20061101023313-9039d-d067e9bcd7dc0c7cabd57674d1072c5b882ad4e7.gz
---
 conf/dokuwiki.php                               | 1 +
 feed.php                                        | 2 +-
 lib/plugins/config/lang/en/lang.php             | 1 +
 lib/plugins/config/settings/config.metadata.php | 1 -
 4 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php
index 0df72bce4..b239d54d2 100644
--- a/conf/dokuwiki.php
+++ b/conf/dokuwiki.php
@@ -106,6 +106,7 @@ $conf['rss_linkto'] = 'diff';            //what page RSS entries link to:
                                          //  'current' - most recent revision of page
 $conf['rss_update'] = 5*60;              //Update the RSS feed every n minutes (defaults to 5 minutes)
 $conf['recent_days'] = 7;                //How many days of recent changes to keep. (days)
+$conf['rss_show_summary'] = 1;           //Add revision summary to title? 0|1
 
 //Set target to use when creating links - leave empty for same window
 $conf['target']['wiki']      = '';
diff --git a/feed.php b/feed.php
index b1d2b3b1d..b20e0aaa4 100644
--- a/feed.php
+++ b/feed.php
@@ -126,7 +126,7 @@ function rssRecentChanges(&$rss,$num,$ltype,$ns,$minor){
         }else{
             $item->title = $recent['id'];
         }
-        if(!empty($recent['sum'])){
+        if($conf['rss_show_summary'] && !empty($recent['sum'])){
             $item->title .= ' - '.strip_tags($recent['sum']);
         }
 
diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php
index 24b8db147..70109e5fb 100644
--- a/lib/plugins/config/lang/en/lang.php
+++ b/lib/plugins/config/lang/en/lang.php
@@ -125,6 +125,7 @@ $lang['rss_type']    = 'XML feed type';
 $lang['rss_linkto']  = 'XML feed links to';
 $lang['rss_update']  = 'XML feed update interval (sec)';
 $lang['recent_days'] = 'How many recent changes to keep (days)';
+$lang['rss_show_summary'] = 'XML feed show summary in title';
 
 /* Target options */
 $lang['target____wiki']      = 'Target window for internal links';
diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php
index 44b121dfa..36b2be38b 100644
--- a/lib/plugins/config/settings/config.metadata.php
+++ b/lib/plugins/config/settings/config.metadata.php
@@ -163,7 +163,6 @@ $meta['rss_type']    = array('multichoice','_choices' => array('rss','rss1','rss
 $meta['rss_linkto']  = array('multichoice','_choices' => array('diff','page','rev','current'));
 $meta['rss_update']  = array('numeric');
 $meta['recent_days'] = array('numeric');
-$meta['test_indexer'] = array('numeric'); // FIXME: delete when no longer needed
 
 $meta['_network']    = array('fieldset');
 $meta['proxy____host'] = array('string','_pattern' => '#^[a-z0-9\-\.+]+?#i');
-- 
GitLab