Changeset:
88a8afcb8e5d
https://sourceforge.net/p/mrbs/hg-code/ci/88a8afcb8e5d1df6230e08ad8d47c5578a03b1bb
Author:
Campbell Morrison <[email protected]>
Date:
Thu Mar 03 17:07:46 2016 +0000
Log message:
Fixed datalists so that empty strings aren't presented as options
diffstat:
web/functions.inc | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
diffs (33 lines):
diff -r 152f438173c8 -r 88a8afcb8e5d web/functions.inc
--- a/web/functions.inc Thu Mar 03 16:59:22 2016 +0000
+++ b/web/functions.inc Thu Mar 03 17:07:46 2016 +0000
@@ -1378,17 +1378,20 @@
foreach ($params['options'] as $value => $text)
{
- // We can cope with both associative and ordinary arrays
- if (!$params['force_assoc'] && !is_assoc($params['options']))
+ if ($text !== '')
{
- $value = $text;
+ // We can cope with both associative and ordinary arrays
+ if (!$params['force_assoc'] && !is_assoc($params['options']))
+ {
+ $value = $text;
+ }
+ $html .= "<option";
+ if (!$params['force_indexed'])
+ {
+ $html .= " value=\"" . htmlspecialchars($value) . "\"";
+ }
+ $html .= ">" . htmlspecialchars($text) . "</option>\n";
}
- $html .= "<option";
- if (!$params['force_indexed'])
- {
- $html .= " value=\"" . htmlspecialchars($value) . "\"";
- }
- $html .= ">" . htmlspecialchars($text) . "</option>\n";
}
$html .= "</select>\n";
$html .= "</datalist>\n";
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits