Index: trunk/extensions/Validator/RELEASE-NOTES |
— | — | @@ -8,6 +8,7 @@ |
9 | 9 | (2011-09-xx) |
10 | 10 | |
11 | 11 | * Fixed compatibility fallback in Parameter::getDescription. |
| 12 | +* Fixed handling of list parameters in ParameterInput. |
12 | 13 | |
13 | 14 | === Validator 0.4.10 === |
14 | 15 | (2011-08-04) |
Index: trunk/extensions/Validator/includes/ParameterInput.php |
— | — | @@ -130,10 +130,16 @@ |
131 | 131 | * |
132 | 132 | * @since 0.4.6 |
133 | 133 | * |
134 | | - * @return mixed |
| 134 | + * @return string |
135 | 135 | */ |
136 | 136 | protected function getValueToUse() { |
137 | | - return $this->currentValue === false ? $this->param->getDefault() : $this->currentValue; |
| 137 | + $value = $this->currentValue === false ? $this->param->getDefault() : $this->currentValue; |
| 138 | + |
| 139 | + if ( $this->param->isList() && is_array( $value ) ) { |
| 140 | + $value = implode( $this->param->getDelimiter(), $value ); |
| 141 | + } |
| 142 | + |
| 143 | + return $value; |
138 | 144 | } |
139 | 145 | |
140 | 146 | /** |
Index: trunk/extensions/Validator/includes/ListParameter.php |
— | — | @@ -233,4 +233,15 @@ |
234 | 234 | $this->setDoManipulationOfDefault( $manipulate ); |
235 | 235 | } |
236 | 236 | |
| 237 | + /** |
| 238 | + * Returns the delimiter. |
| 239 | + * |
| 240 | + * @since 0.4.11 |
| 241 | + * |
| 242 | + * @return string |
| 243 | + */ |
| 244 | + public function getDelimiter() { |
| 245 | + return $this->delimiter; |
| 246 | + } |
| 247 | + |
237 | 248 | } |
\ No newline at end of file |