From dd749ffa6eb7f4320f04dc25b8322399cf346550 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 5 Dec 2008 21:27:12 +0000 Subject: [PATCH] Add special handling for query values of 'false' (the string) to convert them to false (boolean) --- etemplate/inc/class.ajax_select_widget.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etemplate/inc/class.ajax_select_widget.inc.php b/etemplate/inc/class.ajax_select_widget.inc.php index 801616b42e..5e31f9fbf2 100644 --- a/etemplate/inc/class.ajax_select_widget.inc.php +++ b/etemplate/inc/class.ajax_select_widget.inc.php @@ -267,7 +267,7 @@ } // Expand lists - foreach($query as $key => $row) { + foreach($query as $key => &$row) { if(strpos($row, ',')) { $query[$key] = explode(',', $row); } @@ -275,6 +275,8 @@ // sometimes it sends 'null' (not null) if($row == 'null') { unset($query[$key]); + } elseif (strtolower($row) == 'false') { + $row = false; } } $query['search'] = $value;