From 93aa6cd8325facea6faa26642b95d72c0c52456f Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 8 Sep 2014 09:48:55 +0000 Subject: bug 3136: search by author must be an exact match, now that we have the author listbox git-svn-id: http://piwigo.org/svn/trunk@29431 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_search.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/functions_search.inc.php') diff --git a/include/functions_search.inc.php b/include/functions_search.inc.php index 1af36d3af..28682215e 100644 --- a/include/functions_search.inc.php +++ b/include/functions_search.inc.php @@ -70,7 +70,14 @@ function get_sql_search_clause($search) $local_clauses = array(); foreach ($search['fields'][$textfield]['words'] as $word) { - $local_clauses[] = $textfield." LIKE '%".$word."%'"; + if ('author' == $textfield) + { + $local_clauses[] = $textfield."='".$word."'"; + } + else + { + $local_clauses[] = $textfield." LIKE '%".$word."%'"; + } } // adds brackets around where clauses -- cgit v1.2.3