mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
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:
@@ -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 ",
|
||||
|
||||
Reference in New Issue
Block a user