[3875] trunk/htdocs/system/admin/formcontrols/tabcontrol_select.php: Keep tabcontrol_select from generating E_NOTICEs by checking $multiple, thanks to the_angry_angel for the patch (slightly rearranged).

0 views
Skip to first unread message

svn-N...@habariproject.org

unread,
Dec 9, 2009, 4:13:06 PM12/9/09
to habar...@googlegroups.com
Revision
3875
Author
mikelietz
Date
2009-12-09 21:13:05 +0000 (Wed, 09 Dec 2009)

Log Message

Keep tabcontrol_select from generating E_NOTICEs by checking $multiple, thanks to the_angry_angel for the patch (slightly rearranged). Closes #1098.

Modified Paths

Diff

Modified: trunk/htdocs/system/admin/formcontrols/tabcontrol_select.php (3874 => 3875)


--- trunk/htdocs/system/admin/formcontrols/tabcontrol_select.php	2009-12-09 14:42:40 UTC (rev 3874)
+++ trunk/htdocs/system/admin/formcontrols/tabcontrol_select.php	2009-12-09 21:13:05 UTC (rev 3875)
@@ -1,7 +1,7 @@
 <div class="container<?php echo ($class) ? ' ' . $class : ''?>">
 	<p class="pct25"><label for="<?php echo $id; ?>"><?php echo $this->caption; ?></label></p>
 	<p class="pct75">
-	 	<select class="longselect" id="<?php echo $id; ?>" name="<?php echo $field . ( $multiple ? '[]' : '' ); ?>"<?php echo ( $multiple ? ' multiple="multiple" size="' . intval($size) . '"' : '' ) ?>>
+	 	<select class="longselect" id="<?php echo $id; ?>" name="<?php echo $field . ( !empty( $multiple ) ? '[]" multiple="multiple" size="' . intval( $size ) . '"' : '"' ); ?>>
 <?php foreach($options as $opts_key => $opts_val) : ?>
 	<?php if (is_array($opts_val)) : ?>
 		<optgroup label="<?php echo $opts_key; ?>">
Reply all
Reply to author
Forward
0 new messages