Lines Matching refs:ns
18 protected $ns; variable in helper_plugin_searchns
25 $this->ns = $this->getNsFromConfig();
35 if (!is_null($this->ns)) {
36 return $this->ns;
39 $ns = [];
42 if (empty($config)) return $ns;
49 return $ns;
51 $ns[trim($n[1])] = rtrim(trim($n[0], ':'));
55 $ns = array_merge([$this->getLang('all label') => ''], $ns);
57 $ns[$this->getLang('all label')] = '';
60 return $ns;
66 * @param string $ns
69 public function filterByACL($ns) argument
71 if ($ns === '') return true; // all is always allowed
72 return auth_quickaclcheck($ns . ':*') >= AUTH_READ;
90 $ns = $INPUT->str('ns');
93 $query = urldecode($query) . ($ns ? " @$ns" : '');
104 } elseif (!$ns) {
146 foreach ($namespaces as $label => $ns) {
147 $res[$ns] = array_filter(
149 static fn($page) => strpos($page, $ns . ':') === 0,
153 if (!empty($res[$ns])) {
155 $res[$ns] = array_merge([$label => self::SEARCHNS_HEADING], $res[$ns]);
157 $results = array_diff_key($results, $res[$ns]);
163 foreach ($original as $ns) {
164 if (!empty($res[$ns])) {
165 $all = array_merge($all, $res[$ns]);