r85254 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85253‎ | r85254 | r85255 >
Date:13:32, 3 April 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
some fixes
Modified paths:
  • /trunk/extensions/Validator/includes/ParameterInput.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Validator/includes/ParameterInput.php
@@ -103,7 +103,7 @@
104104
105105 if ( count( $valueList ) > 0 ) {
106106 $valueList = count( $valueList ) > 1 ? call_user_func_array( 'array_intersect', $valueList ) : $valueList[0];
107 - $html = $this->param->isList() ? $this->getChckboxListInput( $valueList ) : $this->getSelectInput( $valueList );
 107+ $html = $this->param->isList() ? $this->getCheckboxListInput( $valueList ) : $this->getSelectInput( $valueList );
108108 }
109109 else {
110110 switch ( $this->param->getType() ) {
@@ -199,7 +199,7 @@
200200 $options = array();
201201 $options[] = '<option value=""></option>';
202202
203 - $currentValues = $this->getValueToUse();
 203+ $currentValues = (array)$this->getValueToUse();
204204 if ( is_null( $currentValues ) ) $currentValues = array();
205205
206206 foreach ( $valueList as $value ) {
@@ -230,7 +230,7 @@
231231 protected function getCheckboxListInput( array $valueList ) {
232232 $boxes = array();
233233
234 - $currentValues = $this->getValueToUse();
 234+ $currentValues = (array)$this->getValueToUse();
235235 if ( is_null( $currentValues ) ) $currentValues = array();
236236
237237 foreach ( $valueList as $value ) {
@@ -243,7 +243,7 @@
244244 $this->inputName . '[' . htmlspecialchars( $value ). ']',
245245 in_array( $value, $currentValues )
246246 ) .
247 - Html::element( 'tt', $value )
 247+ Html::element( 'tt', array(), $value )
248248 );
249249 }
250250

Status & tagging log