From ecebd72f127152f005618420821a268ce18e826a Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag <klapinklapin@gmail.com> Date: Wed, 30 Jul 2014 14:38:24 +0200 Subject: [PATCH] improve qsearch suggestions * support namespaces with more then one level e.g. @your:namespace * support ns:<ns> as well --- inc/fulltext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/fulltext.php b/inc/fulltext.php index dd918f214..aaef090e1 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -215,7 +215,7 @@ function ft_pageLookup($id, $in_ns=false, $in_title=false){ function _ft_pageLookup(&$data){ // split out original parameters $id = $data['id']; - if (preg_match('/(?:^| )@(\w+)/', $id, $matches)) { + if (preg_match('/(?:^| )(?:@|ns:)([\w:]+)/', $id, $matches)) { $ns = cleanID($matches[1]) . ':'; $id = str_replace($matches[0], '', $id); } -- GitLab