summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEsther Brunner <esther@kaffeehaus.ch>2005-09-01 15:02:31 +0200
committerEsther Brunner <esther@kaffeehaus.ch>2005-09-01 15:02:31 +0200
commit8f1d587c911d8ea5357e70d211735110e7ce6072 (patch)
tree7e6fab93a428f605d58d3dd2a035b729e2c4b53c
parentbdfaba83b8267509d399cbb0ff65fb78d79bb83f (diff)
downloadrpg-8f1d587c911d8ea5357e70d211735110e7ce6072.tar.gz
rpg-8f1d587c911d8ea5357e70d211735110e7ce6072.tar.bz2
exclude subnamespaces from recents: added optional fifth parameter
darcs-hash:20050901130231-283c4-fd31cb63033acaf11787d965b285fbfeb36f2a84.gz
-rw-r--r--inc/common.php5
1 files changed, 4 insertions, 1 deletions
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 <andi@splitbrain.org>
*/
-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 */