From cb820c8ccf67dd30018854545a8910d2d125a6bf Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 29 Mar 2005 17:06:50 +0000 Subject: [PATCH] only omit filter-column in search, if it's realy set to a value --- etemplate/inc/class.so_sql.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.so_sql.inc.php b/etemplate/inc/class.so_sql.inc.php index ce5bbbcc9b..caee32d4b8 100644 --- a/etemplate/inc/class.so_sql.inc.php +++ b/etemplate/inc/class.so_sql.inc.php @@ -404,7 +404,7 @@ class so_sql foreach($this->db_cols as $db_col => $col) { //echo "testing col='$col', criteria[$col]='".$criteria[$col]."'
"; - if (isset($filter[$col])) continue; // added later + if (isset($filter[$col]) && $filter[$col]) continue; // added later if (isset($criteria[$col]) && ($empty || $criteria[$col] != '')) { @@ -424,7 +424,7 @@ class so_sql echo "filter=";_debug_array($filter); echo "data2db(filter)=";_debug_array($data2db_filter); } - foreach($this->data2db($filter) as $col => $val) + foreach($data2db_filter as $col => $val) { if ($val !== '') $db_filter[array_search($col,$this->db_cols)] = $val; }