Changeset:
f4af27f9944c
https://sourceforge.net/p/mrbs/hg-code/ci/f4af27f9944c9fdd8a78f43a0407de70b00f953a
Author:
Campbell Morrison <[email protected]>
Date:
Sat Mar 05 07:58:19 2016 +0000
Log message:
When a field with $select_options or $datalist_options is being used in the
report form, remove any options that have an empty key or value as they will be
meaningless for the search.
diffstat:
web/report.php | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diffs (15 lines):
diff -r df33d386fd2b -r f4af27f9944c web/report.php
--- a/web/report.php Thu Mar 03 17:27:30 2016 +0000
+++ b/web/report.php Sat Mar 05 07:58:19 2016 +0000
@@ -30,6 +30,11 @@
if (isset($params['options']))
{
+ // Remove any element with an empty key. This will just be associated
with a
+ // required select element and the value will be meaningless for a search.
+ unset($params['options']['']);
+ // Remove any elements with an empty value. These will be meaningless
for a search.
+ $params['options'] = array_diff($params['options'], array(''));
// We force the values to be used and not the keys. We will convert
// back to values when we construct the SQL query.
$params['force_indexed'] = TRUE;
------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits