From 1b989e463d66ca328dbc0a752236857ccf6e2ed4 Mon Sep 17 00:00:00 2001 From: Rapsey Date: Sat, 6 Jun 2015 15:50:25 +0200 Subject: [PATCH] Removes disabled namespaces from approvals listing --- syntax.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/syntax.php b/syntax.php index 1cb78d6..ca21445 100644 --- a/syntax.php +++ b/syntax.php @@ -131,7 +131,7 @@ function getPagesFromNamespace($namespace) { global $conf; $dir = $conf['datadir'] . '/' . str_replace(':', '/', $namespace); $pages = array(); - search($pages, $dir, array($this,'_search_helper'), array($namespace, $this->getConf('apr_namespaces'))); + search($pages, $dir, array($this,'_search_helper'), array($namespace, $this->getConf('apr_namespaces'), $this->getConf('no_apr_namespaces'))); return $pages; } @@ -144,6 +144,7 @@ function getPagesFromNamespace($namespace) { function _search_helper(&$data, $base, $file, $type, $lvl, $opts) { $ns = $opts[0]; $valid_ns = $opts[1]; + $invalid_ns = $opts[2]; if ($type == 'd') { return $this->hlp->in_sub_namespace($valid_ns, $ns . ':' . str_replace('/', ':', $file)); @@ -154,7 +155,7 @@ function _search_helper(&$data, $base, $file, $type, $lvl, $opts) { } $id = pathID($ns . $file); - if (!$this->hlp->in_namespace($valid_ns, $id)) { + if (!$this->hlp->in_namespace($valid_ns, $id) || $this->hlp->in_namespace($invalid_ns, $id)) { return false; }