Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php |
— | — | @@ -126,7 +126,7 @@ |
127 | 127 | |
128 | 128 | // load jQuery on MW 1.16 |
129 | 129 | if ( is_callable( array( $wgOut, 'includeJQuery' ) ) ) { |
130 | | - $wgOut -> includeJQuery(); |
| 130 | + $wgOut->includeJQuery(); |
131 | 131 | } |
132 | 132 | |
133 | 133 | return true; |
— | — | @@ -250,7 +250,7 @@ |
251 | 251 | } |
252 | 252 | |
253 | 253 | static function renderFormInput ( &$parser ) { |
254 | | - global $wgVersion; |
| 254 | + global $wgVersion; |
255 | 255 | |
256 | 256 | $params = func_get_args(); |
257 | 257 | array_shift( $params ); // don't need the parser |
— | — | @@ -342,7 +342,7 @@ |
343 | 343 | 'value' => $inValue, |
344 | 344 | 'class' => 'autocompleteInput createboxInput formInput', |
345 | 345 | 'autocompletesettings' => 'input_' . $input_num |
346 | | - ) ); |
| 346 | + ) ); |
347 | 347 | } |
348 | 348 | // if the form start URL looks like "index.php?title=Special:FormStart" |
349 | 349 | // (i.e., it's in the default URL style), add in the title as a |
— | — | @@ -438,10 +438,10 @@ |
439 | 439 | */ |
440 | 440 | static function renderArrayMapObj( &$parser, $frame, $args ) { |
441 | 441 | # Set variables |
442 | | - $value = isset( $args[0] ) ? trim( $frame->expand( $args[0] ) ) : ''; |
443 | | - $delimiter = isset( $args[1] ) ? trim( $frame->expand( $args[1] ) ) : ','; |
444 | | - $var = isset( $args[2] ) ? trim( $frame->expand( $args[2], PPFrame::NO_ARGS | PPFrame::NO_TEMPLATES ) ) : 'x'; |
445 | | - $formula = isset( $args[3] ) ? $args[3] : 'x'; |
| 442 | + $value = isset( $args[0] ) ? trim( $frame->expand( $args[0] ) ) : ''; |
| 443 | + $delimiter = isset( $args[1] ) ? trim( $frame->expand( $args[1] ) ) : ','; |
| 444 | + $var = isset( $args[2] ) ? trim( $frame->expand( $args[2], PPFrame::NO_ARGS | PPFrame::NO_TEMPLATES ) ) : 'x'; |
| 445 | + $formula = isset( $args[3] ) ? $args[3] : 'x'; |
446 | 446 | $new_delimiter = isset( $args[4] ) ? trim( $frame->expand( $args[4] ) ) : ', '; |
447 | 447 | # Unstrip some |
448 | 448 | $delimiter = $parser->mStripState->unstripNoWiki( $delimiter ); |
— | — | @@ -462,8 +462,8 @@ |
463 | 463 | $old_value = trim( $old_value ); |
464 | 464 | if ( $old_value == '' ) continue; |
465 | 465 | $result_value = $frame->expand( $formula, PPFrame::NO_ARGS | PPFrame::NO_TEMPLATES ); |
466 | | - $result_value = str_replace( $var, $old_value, $result_value ); |
467 | | - $result_value = $parser->preprocessToDom( $result_value, $frame->isTemplate() ? Parser::PTD_FOR_INCLUSION : 0 ); |
| 466 | + $result_value = str_replace( $var, $old_value, $result_value ); |
| 467 | + $result_value = $parser->preprocessToDom( $result_value, $frame->isTemplate() ? Parser::PTD_FOR_INCLUSION : 0 ); |
468 | 468 | $result_value = trim( $frame->expand( $result_value ) ); |
469 | 469 | if ( $result_value == '' ) continue; |
470 | 470 | $results_array[] = $result_value; |
— | — | @@ -507,9 +507,9 @@ |
508 | 508 | */ |
509 | 509 | static function renderArrayMapTemplateObj( &$parser, $frame, $args ) { |
510 | 510 | # Set variables |
511 | | - $value = isset( $args[0] ) ? trim( $frame->expand( $args[0] ) ) : ''; |
512 | | - $template = isset( $args[1] ) ? trim( $frame->expand( $args[1] ) ) : ''; |
513 | | - $delimiter = isset( $args[2] ) ? trim( $frame->expand( $args[2] ) ) : ','; |
| 511 | + $value = isset( $args[0] ) ? trim( $frame->expand( $args[0] ) ) : ''; |
| 512 | + $template = isset( $args[1] ) ? trim( $frame->expand( $args[1] ) ) : ''; |
| 513 | + $delimiter = isset( $args[2] ) ? trim( $frame->expand( $args[2] ) ) : ','; |
514 | 514 | $new_delimiter = isset( $args[3] ) ? trim( $frame->expand( $args[3] ) ) : ', '; |
515 | 515 | # Unstrip some |
516 | 516 | $delimiter = $parser->mStripState->unstripNoWiki( $delimiter ); |
— | — | @@ -564,10 +564,10 @@ |
565 | 565 | |
566 | 566 | switch ( $key ) { |
567 | 567 | case 'link text': |
568 | | - $linkString = $parser -> recursiveTagParse( $value ); |
| 568 | + $linkString = $parser->recursiveTagParse( $value ); |
569 | 569 | break; |
570 | 570 | case 'link type': |
571 | | - $linkType = $parser -> recursiveTagParse( $value ); |
| 571 | + $linkType = $parser->recursiveTagParse( $value ); |
572 | 572 | break; |
573 | 573 | case 'reload': |
574 | 574 | $classString .= ' reload'; |
— | — | @@ -600,7 +600,7 @@ |
601 | 601 | ); |
602 | 602 | |
603 | 603 | // return output HTML |
604 | | - return $parser -> insertStripItem( $output, $parser -> mStripState ); |
| 604 | + return $parser->insertStripItem( $output, $parser->mStripState ); |
605 | 605 | } |
606 | 606 | |
607 | 607 | |
— | — | @@ -651,7 +651,7 @@ |
652 | 652 | global $sfgScriptPath; |
653 | 653 | |
654 | 654 | if ( defined( 'MW_SUPPORTS_RESOURCE_MODULES' ) ) { |
655 | | - $parser -> getOutput() -> addModules( 'ext.semanticforms.autoedit' ); |
| 655 | + $parser->getOutput()->addModules( 'ext.semanticforms.autoedit' ); |
656 | 656 | } else { |
657 | 657 | |
658 | 658 | static $loaded = false; |
— | — | @@ -660,14 +660,14 @@ |
661 | 661 | if ( !$loaded ) { |
662 | 662 | |
663 | 663 | // load extensions JavaScript |
664 | | - $parser -> getOutput() -> addHeadItem( |
| 664 | + $parser->getOutput()->addHeadItem( |
665 | 665 | '<script type="text/javascript" src="' . $sfgScriptPath |
666 | 666 | . '/libs/SF_autoedit.js"></script> ' ."\n", |
667 | 667 | 'sf_autoedit_script' |
668 | 668 | ); |
669 | 669 | |
670 | 670 | // load extensions style sheet |
671 | | - $parser -> getOutput() -> addHeadItem( |
| 671 | + $parser->getOutput()->addHeadItem( |
672 | 672 | '<link rel="stylesheet" href="' . $sfgScriptPath |
673 | 673 | . '/skins/SF_autoedit.css"/> ' ."\n", |
674 | 674 | 'sf_autoedit_style' |