aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_search.inc.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/functions_search.inc.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/functions_search.inc.php b/include/functions_search.inc.php
index 66452459e..9cf50d602 100644
--- a/include/functions_search.inc.php
+++ b/include/functions_search.inc.php
@@ -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 ",