From d0ab54f6197249cebc808395ab9de9da0df153f3 Mon Sep 17 00:00:00 2001 From: "Michael Klier chi@chimeric.de" Date: Thu, 18 May 2006 18:18:55 +0200 Subject: namespace restricted fulltext-search - The fulltext-search can now be restricted to a given namespace seperated by an "@" darcs-hash:20060518161855-484ab-1617b6d2c3593525f4d29a789b0a32ebf414b9ae.gz --- inc/html.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 6d0b7e116..928da9cef 100644 --- a/inc/html.php +++ b/inc/html.php @@ -365,6 +365,18 @@ function html_search(){ print p_locale_xhtml('searchpage'); flush(); + //check if search is restricted to namespace + if(preg_match('/([^@]*)@([^@]*)/',$QUERY,$match)) { + $id = cleanID($match[1]); + if(empty($id)) { + print '
'.$lang['nothingfound'].'
'; + flush(); + return; + } + } else { + $id = cleanID($QUERY); + } + //show progressbar print '
'; print '
'; @@ -375,7 +387,8 @@ function html_search(){ //do quick pagesearch $data = array(); - $data = ft_pageLookup(cleanID($QUERY)); + + $data = ft_pageLookup($id); if(count($data)){ sort($data); print '
'; -- cgit v1.2.3