r72379 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72378‎ | r72379 | r72380 >
Date:14:44, 4 September 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Minor fix
Modified paths:
  • /trunk/extensions/Validator/includes/ParserHook.php (modified) (history)
  • /trunk/extensions/Validator/includes/Validator.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Validator/includes/ParserHook.php
@@ -53,7 +53,7 @@
5454 * @since 0.4
5555 */
5656 public function __construct() {
57 - $this->validator = new Validator( $this->getName() );
 57+
5858 }
5959
6060 /**
@@ -144,6 +144,8 @@
145145 public function validateAndRender( array $arguments, $parsed ) {
146146 global $egValidatorErrorLevel;
147147
 148+ $this->validator = new Validator( $this->getName() );
 149+
148150 if ( $parsed ) {
149151 $this->validator->setParameters( $arguments, $this->getParameterInfo() );
150152 }
Index: trunk/extensions/Validator/includes/Validator.php
@@ -313,7 +313,7 @@
314314 $this->mParameters[$mainName] = array(
315315 'original-value' => $paramData,
316316 'original-name' => $paramName,
317 - );
 317+ );
318318 }
319319 }
320320 else {
@@ -321,9 +321,9 @@
322322 wfMsgExt(
323323 'validator-error-override-argument',
324324 'parsemag',
325 - $mainName,
 325+ $paramName,
326326 $this->mParameters[$mainName]['original-value'],
327 - 'demo new value' // TODO: get new value
 327+ is_array( $paramData ) ? $paramData['original-value'] : $paramData
328328 ),
329329 'override'
330330 );

Status & tagging log