Index: trunk/extensions/Validator/includes/ParameterInput.php |
— | — | @@ -92,7 +92,6 @@ |
93 | 93 | * @return string |
94 | 94 | */ |
95 | 95 | public function getHtml() { |
96 | | - $html = ''; |
97 | 96 | $valueList = array(); |
98 | 97 | |
99 | 98 | foreach ( $this->param->getCriteria() as $criterion ) { |
— | — | @@ -115,6 +114,7 @@ |
116 | 115 | break; |
117 | 116 | case Parameter::TYPE_BOOLEAN: |
118 | 117 | $html = $this->getBooleanInput(); |
| 118 | + break; |
119 | 119 | case Parameter::TYPE_STRING: |
120 | 120 | default: |
121 | 121 | $html = $this->getStrInput(); |
Index: trunk/extensions/Validator/includes/parserHooks/Validator_Describe.php |
— | — | @@ -349,6 +349,8 @@ |
350 | 350 | foreach ( $parameters as $parameter ) { |
351 | 351 | $tableRows[] = $this->getDescriptionRow( $parameter, $defaults ); |
352 | 352 | } |
| 353 | + |
| 354 | + $table = ''; |
353 | 355 | |
354 | 356 | if ( count( $tableRows ) > 0 ) { |
355 | 357 | $tableRows = array_merge( array( |
— | — | @@ -360,17 +362,17 @@ |
361 | 363 | '!' . wfMsg( 'validator-describe-header-description' ) |
362 | 364 | ), $tableRows ); |
363 | 365 | |
364 | | - $table = implode( "\n|-\n", $tableRows ); |
365 | | - |
366 | | - $h3 = |
367 | | - ( $pre ? '=== ' : '<h3>' ) . |
368 | | - wfMsg( 'validator-describe-parameters' ) . |
369 | | - ( $pre ? ' ===' : '</h3>' ); |
370 | | - |
371 | | - $table = "$h3\n\n" . |
372 | | - '{| class="wikitable sortable"' . "\n" . |
373 | | - $table . |
374 | | - "\n|}"; |
| 366 | + $table = implode( "\n|-\n", $tableRows ); |
| 367 | + |
| 368 | + $h3 = |
| 369 | + ( $pre ? '=== ' : '<h3>' ) . |
| 370 | + wfMsg( 'validator-describe-parameters' ) . |
| 371 | + ( $pre ? ' ===' : '</h3>' ); |
| 372 | + |
| 373 | + $table = "$h3\n\n" . |
| 374 | + '{| class="wikitable sortable"' . "\n" . |
| 375 | + $table . |
| 376 | + "\n|}"; |
375 | 377 | } |
376 | 378 | |
377 | 379 | return $table; |
Index: trunk/extensions/Validator/includes/criteria/CriterionInArray.php |
— | — | @@ -89,8 +89,7 @@ |
90 | 90 | */ |
91 | 91 | protected function getItemErrorMessage( Parameter $parameter ) { |
92 | 92 | global $wgLang; |
93 | | - |
94 | | - $values = $parameter->getValue(); |
| 93 | + |
95 | 94 | $originalCount = count( $this->allowedValues ); |
96 | 95 | |
97 | 96 | if ( $originalCount > 15 ) { |
— | — | @@ -123,10 +122,9 @@ |
124 | 123 | */ |
125 | 124 | protected function getFullListErrorMessage( Parameter $parameter ) { |
126 | 125 | global $wgLang; |
127 | | - |
128 | | - $values = $parameter->getValue(); |
| 126 | + |
129 | 127 | $originalCount = count( $this->allowedValues ); |
130 | | - |
| 128 | + |
131 | 129 | if ( $originalCount > 15 ) { |
132 | 130 | $allowedValues = array_slice( $this->allowedValues, 0, 13 ); |
133 | 131 | $omitCount = $originalCount - count( $allowedValues ); |
Index: trunk/extensions/Validator/includes/ParserHook.php |
— | — | @@ -273,8 +273,6 @@ |
274 | 274 | * @return string |
275 | 275 | */ |
276 | 276 | public function validateAndRender( array $arguments, $type ) { |
277 | | - global $egValidatorErrorLevel; |
278 | | - |
279 | 277 | $names = $this->getNames(); |
280 | 278 | $this->validator = new Validator( $names[0] ); |
281 | 279 | |
— | — | @@ -468,7 +466,7 @@ |
469 | 467 | // Parse the wikitext to HTML. |
470 | 468 | if ( $this->isFunction() ) { |
471 | 469 | return $this->parser->parse( |
472 | | - text, |
| 470 | + $text, |
473 | 471 | $this->parser->mTitle, |
474 | 472 | $this->parser->mOptions, |
475 | 473 | true, |
Index: trunk/extensions/Validator/includes/TopologicalSort.php |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | } |
38 | 38 | |
39 | 39 | // turn pairs into double-linked node tree |
40 | | - foreach ( $dependencies as $key => $dpair ) { |
| 40 | + foreach ( $dependencies as $dpair ) { |
41 | 41 | list ( $module, $dependency ) = each ( $dpair ); |
42 | 42 | if ( !isset( $this->mNodes[$module] ) ) $this->mNodes[$module] = new TSNode( $module ); |
43 | 43 | if ( !isset( $this->mNodes[$dependency] ) ) $this->mNodes[$dependency] = new TSNode( $dependency ); |