From 1e6e762643273efd9cf012e68006fa57ee1b22a3 Mon Sep 17 00:00:00 2001 From: rvelices Date: Sat, 13 Oct 2012 15:40:14 +0000 Subject: feature 2760: allow tag exclusion in quick search git-svn-id: http://piwigo.org/svn/trunk@18636 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_search.inc.php | 274 +++++++++++++++++++++++--------------- index.php | 14 +- themes/default/template/index.tpl | 5 +- 3 files changed, 169 insertions(+), 124 deletions(-) diff --git a/include/functions_search.inc.php b/include/functions_search.inc.php index fec019f81..ee8a7983f 100644 --- a/include/functions_search.inc.php +++ b/include/functions_search.inc.php @@ -305,7 +305,7 @@ function analyse_qsearch($q, &$qtokens, &$qtoken_modifiers) for ($i=0; $i array(85,68,79...) - * 'qs' => array( - * 'matching_tags' => array of matching tags - * 'matching_cats' => array of matching categories - * 'matching_cats_no_images' =>array(99) - matching categories without images - * )) - * - * @param string q - * @param bool super_order_by - * @param string images_where optional aditional restriction on images table - * @return array - */ -function get_quick_search_results($q, $super_order_by, $images_where='') +*/ +function get_qsearch_tags($tokens, $token_modifiers, &$token_tag_ids, &$not_tag_ids, &$all_tags) { - global $user, $conf; - - $search_results = - array( - 'items' => array(), - 'qs' => array('q'=>stripslashes($q)), - ); - $q = trim($q); - analyse_qsearch($q, $tokens, $token_modifiers); - if (count($tokens)==0) - { - return $search_results; - } - $debug[] = '