r65074 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65073‎ | r65074 | r65075 >
Date:18:43, 15 April 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Bugfix to parameter parsing
Modified paths:
  • /trunk/extensions/Validator/Validator.class.php (modified) (history)
  • /trunk/extensions/Validator/Validator_Manager.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Validator/Validator.class.php
@@ -133,11 +133,11 @@
134134 }
135135 } else {
136136 $name = strtolower( trim( array_shift( $parts ) ) );
137 - $parameters[$name] = trim( implode( $parts ) );
 137+ $parameters[$name] = trim( implode( '=', $parts ) );
138138 }
139139 }
140 - }
141 -
 140+ }
 141+
142142 $this->setParameters( $parameters );
143143 }
144144
Index: trunk/extensions/Validator/Validator_Manager.php
@@ -38,7 +38,7 @@
3939 */
4040 public function manageParameters( array $rawParameters, array $parameterInfo, array $defaultParams = array() ) {
4141 global $egValidatorErrorLevel;
42 -
 42+
4343 $validator = new Validator();
4444
4545 $validator->setParameterInfo( $parameterInfo );
@@ -51,7 +51,7 @@
5252 if ( $egValidatorErrorLevel < Validator_ERRORS_STRICT ) $validator->correctInvalidParams();
5353 if ( $egValidatorErrorLevel >= Validator_ERRORS_WARN ) $this->errors = $validator->getErrors();
5454 }
55 -
 55+
5656 return !$hasFatalError ? $validator->getValidParams() : false;
5757 }
5858

Status & tagging log