diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/View/Helper/FormSelect.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web/lib/Zend/View/Helper/FormSelect.php Fri Mar 11 15:05:35 2011 +0100
@@ -0,0 +1,178 @@
+\n")
+ {
+ $info = $this->_getInfo($name, $value, $attribs, $options, $listsep);
+ extract($info); // name, id, value, attribs, options, listsep, disable
+
+ // force $value to array so we can compare multiple values to multiple
+ // options; also ensure it's a string for comparison purposes.
+ $value = array_map('strval', (array) $value);
+
+ // check if element may have multiple values
+ $multiple = '';
+
+ if (substr($name, -2) == '[]') {
+ // multiple implied by the name
+ $multiple = ' multiple="multiple"';
+ }
+
+ if (isset($attribs['multiple'])) {
+ // Attribute set
+ if ($attribs['multiple']) {
+ // True attribute; set multiple attribute
+ $multiple = ' multiple="multiple"';
+
+ // Make sure name indicates multiple values are allowed
+ if (!empty($multiple) && (substr($name, -2) != '[]')) {
+ $name .= '[]';
+ }
+ } else {
+ // False attribute; ensure attribute not set
+ $multiple = '';
+ }
+ unset($attribs['multiple']);
+ }
+
+ // now start building the XHTML.
+ $disabled = '';
+ if (true === $disable) {
+ $disabled = ' disabled="disabled"';
+ }
+
+ // Build the surrounding select element first.
+ $xhtml = '";
+
+ return $xhtml;
+ }
+
+ /**
+ * Builds the actual ";
+
+ return $opt;
+ }
+
+}