diff options
author | Esther Brunner <esther@kaffeehaus.ch> | 2005-09-01 15:02:31 +0200 |
---|---|---|
committer | Esther Brunner <esther@kaffeehaus.ch> | 2005-09-01 15:02:31 +0200 |
commit | 8f1d587c911d8ea5357e70d211735110e7ce6072 (patch) | |
tree | 7e6fab93a428f605d58d3dd2a035b729e2c4b53c | |
parent | bdfaba83b8267509d399cbb0ff65fb78d79bb83f (diff) | |
download | rpg-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.php | 5 |
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 */ |