summaryrefslogtreecommitdiff
path: root/feed.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2005-10-02 13:32:55 +0200
committerAndreas Gohr <andi@splitbrain.org>2005-10-02 13:32:55 +0200
commitb6912aeac771ef294377b8af071d28f6acfa7050 (patch)
tree7c93c9124d89ef748213b421cd582dace7d7442a /feed.php
parent075f000f1c8f0899f80f94e63a11071fcc506c55 (diff)
downloadrpg-b6912aeac771ef294377b8af071d28f6acfa7050.tar.gz
rpg-b6912aeac771ef294377b8af071d28f6acfa7050.tar.bz2
minor edit checkbox
This patch adds a minor edit checkbox to the edit form for logged in users. Minor edits are displayed different in recent changes and the page revision history. The RSS feed excludes minor edits by default - this can be changed by adding a minor darcs-hash:20051002113255-7ad00-2bc9e1aaa76d9616428e760529ecc14ef119cf71.gz
Diffstat (limited to 'feed.php')
-rw-r--r--feed.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/feed.php b/feed.php
index c4c386261..9a6e39264 100644
--- a/feed.php
+++ b/feed.php
@@ -20,6 +20,7 @@
$num = $_REQUEST['num'];
$type = $_REQUEST['type'];
$mode = $_REQUEST['mode'];
+ $minor = $_REQUEST['minor'];
$ns = $_REQUEST['ns'];
$ltype = $_REQUEST['linkto'];
@@ -69,7 +70,7 @@
if($mode == 'list'){
rssListNamespace($rss,$ns);
}else{
- rssRecentChanges($rss,$num,$ltype,$ns);
+ rssRecentChanges($rss,$num,$ltype,$ns,$minor);
}
$feed = $rss->createFeed($type,'utf-8');
@@ -88,12 +89,16 @@
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
-function rssRecentChanges(&$rss,$num,$ltype,$ns){
+function rssRecentChanges(&$rss,$num,$ltype,$ns,$minor){
global $conf;
if(!$num) $num = $conf['recent'];
$guardmail = ($conf['mailguard'] != '' && $conf['mailguard'] != 'none');
- $recents = getRecents(0,$num,false,$ns);
+
+ $flags = RECENTS_SKIP_DELETED;
+ if(!$minor) $flags += RECENTS_SKIP_MINORS;
+
+ $recents = getRecents(0,$num,$ns,$flags);
//this can take some time if a lot of recaching has to be done
@set_time_limit(90); // set max execution time