bug 3020 and bug 3021 fixed: additionnal checks in search inputs

git-svn-id: http://piwigo.org/svn/trunk@26825 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2014-01-17 12:50:14 +00:00
parent 787089742d
commit 7f39d5b695
3 changed files with 11 additions and 2 deletions
+6
View File
@@ -113,6 +113,12 @@ function get_sql_search_clause($search)
create_function('&$s','$s="(".$s.")";')
);
// make sure the "mode" is either OR or AND
if ($search['fields']['allwords']['mode'] != 'AND' and $search['fields']['allwords']['mode'] != 'OR')
{
$search['fields']['allwords']['mode'] = 'AND';
}
$clauses[] = "\n ".
implode(
"\n ". $search['fields']['allwords']['mode']. "\n ",