From 828bb42ce3d4868059bc6c6b454bdb79c835e677 Mon Sep 17 00:00:00 2001 From: modus75 Date: Fri, 13 Jan 2017 21:22:20 +0100 Subject: [PATCH] Fix quick search (in php 0=='' but 0!=='') !!! --- include/functions_search.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/functions_search.inc.php b/include/functions_search.inc.php index b29ebb8f4..a9c3af0c6 100644 --- a/include/functions_search.inc.php +++ b/include/functions_search.inc.php @@ -422,7 +422,7 @@ class QNumericRangeScope extends QSearchScope } } - if (!$this->nullable && $range[0]=='' && $range[1] == '') + if (!$this->nullable && $range[0]==='' && $range[1]==='') return false; $token->scope_data = array( 'range'=>$range, 'strict'=>$strict ); return true; @@ -431,9 +431,9 @@ class QNumericRangeScope extends QSearchScope function get_sql($field, $token) { $clauses = array(); - if ($token->scope_data['range'][0]!='') + if ($token->scope_data['range'][0]!=='') $clauses[] = $field.' >'.($token->scope_data['strict'][0]?'':'=').$token->scope_data['range'][0].' '; - if ($token->scope_data['range'][1]!='') + if ($token->scope_data['range'][1]!=='') $clauses[] = $field.' <'.($token->scope_data['strict'][1]?'':'=').$token->scope_data['range'][1].' '; if (empty($clauses))