Index: trunk/extensions/Validator/includes/ListParameter.php |
— | — | @@ -93,6 +93,21 @@ |
94 | 94 | public function isList() { |
95 | 95 | return true; |
96 | 96 | } |
| 97 | + |
| 98 | + /** |
| 99 | + * Sets the $value to a cleaned value of $originalValue. |
| 100 | + * |
| 101 | + * @since 0.4 |
| 102 | + */ |
| 103 | + protected function cleanValue() { |
| 104 | + $this->value = explode( $this->delimiter, $this->originalValue ); |
| 105 | + |
| 106 | + if ( $this->lowerCaseValue ) { |
| 107 | + foreach ( $this->value as &$item ) { |
| 108 | + $item = strtolower( $this->value ); |
| 109 | + } |
| 110 | + } |
| 111 | + } |
97 | 112 | |
98 | 113 | /** |
99 | 114 | * Validates all items in the list. |
Index: trunk/extensions/Validator/includes/Parameter.php |
— | — | @@ -176,9 +176,8 @@ |
177 | 177 | $delimiter = $definition['type'][2]; |
178 | 178 | } |
179 | 179 | } |
180 | | - else { |
181 | | - $type = $definition['type'][0]; |
182 | | - } |
| 180 | + |
| 181 | + $type = $definition['type'][0]; |
183 | 182 | } |
184 | 183 | else { |
185 | 184 | $type = $definition['type']; |