aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2014-03-22 13:03:45 +0000
committerrvelices <rv-github@modusoptimus.com>2014-03-22 13:03:45 +0000
commitdc17fc9ba94b9490ed79fc82b9c4d5bf7f2640af (patch)
tree00bc3c25778d848ac4d51fe6f2f5b06462c7b28e /index.php
parenteeb9c387cc4b2f131e3a98afa255992042d9904e (diff)
bug 3056: quick search OR operator priority taken into account
search for 'mary qwerty' will ignore 'qwerty' and return only results for 'mary' if there is no such thing as 'qwerty' in the photos (if there was 'mary' and 'qwerty', the results for both 'mary' AND 'qwerty' would be shown) git-svn-id: http://piwigo.org/svn/trunk@27882 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--index.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/index.php b/index.php
index 289059227..c6ce22f56 100644
--- a/index.php
+++ b/index.php
@@ -241,6 +241,15 @@ if ( empty($page['is_external']) or !$page['is_external'] )
$tag['URL'] = make_index_url(array('tags'=>array($tag)));
$template->append( 'tag_search_results', $tag);
}
+
+ if (empty($page['items']))
+ {
+ $template->append( 'no_search_results', $page['qsearch_details']['q']);
+ }
+ elseif (!empty($page['qsearch_details']['unmatched_terms']))
+ {
+ $template->assign( 'no_search_results', $page['qsearch_details']['unmatched_terms']);
+ }
}
// image order