From 8f1d587c911d8ea5357e70d211735110e7ce6072 Mon Sep 17 00:00:00 2001 From: Esther Brunner Date: Thu, 1 Sep 2005 15:02:31 +0200 Subject: exclude subnamespaces from recents: added optional fifth parameter darcs-hash:20050901130231-283c4-fd31cb63033acaf11787d965b285fbfeb36f2a84.gz --- inc/common.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'inc/common.php') diff --git a/inc/common.php b/inc/common.php index c478fb35a..5358d5d2e 100644 --- a/inc/common.php +++ b/inc/common.php @@ -604,7 +604,7 @@ function addLogEntry($date,$id,$summary=""){ * * @author Andreas Gohr */ -function getRecents($first,$num,$incdel=false,$ns=''){ +function getRecents($first,$num,$incdel=false,$ns='',$subNS=true){ global $conf; $recent = array(); $names = array(); @@ -631,6 +631,9 @@ function getRecents($first,$num,$incdel=false,$ns=''){ ){ // filter namespace if (($ns) && (strpos($info[2],$ns.':') !== 0)) continue; + + // exclude subnamespaces + if ((!$subNS) && (getNS($info[2]) != $ns)) continue; $names[$info[2]] = 1; if(--$first >= 0) continue; /* skip "first" entries */ -- cgit v1.2.3