|
@@ -43,7 +43,7 @@ discard block |
|
|
block discarded – undo |
|
43
|
43
|
*/ |
|
44
|
44
|
public static function initExtension() { |
|
45
|
45
|
|
|
46
|
|
- $GLOBALS[ 'wgExtensionFunctions' ][] = function () { |
|
|
46
|
+ $GLOBALS[ 'wgExtensionFunctions' ][ ] = function() { |
|
47
|
47
|
|
|
48
|
48
|
$parser = LingoParser::getInstance(); |
|
49
|
49
|
|
|
@@ -53,14 +53,14 @@ discard block |
|
|
block discarded – undo |
|
53
|
53
|
|
|
54
|
54
|
\Hooks::register( 'ParserAfterParse', array( $parser, 'parse' ) ); |
|
55
|
55
|
|
|
56
|
|
- \Hooks::register('GetDoubleUnderscoreIDs', function ( array &$doubleUnderscoreIDs ) { |
|
57
|
|
- $doubleUnderscoreIDs[] = 'noglossary'; |
|
|
56
|
+ \Hooks::register( 'GetDoubleUnderscoreIDs', function( array &$doubleUnderscoreIDs ) { |
|
|
57
|
+ $doubleUnderscoreIDs[ ] = 'noglossary'; |
|
58
|
58
|
return true; |
|
59
|
59
|
} ); |
|
60
|
60
|
|
|
61
|
|
- \Hooks::register( 'ParserFirstCallInit', function ( \Parser $parser ) { |
|
|
61
|
+ \Hooks::register( 'ParserFirstCallInit', function( \Parser $parser ) { |
|
62
|
62
|
|
|
63
|
|
- $parser->setHook( 'noglossary', function ( $input, array $args, \Parser $parser, \PPFrame $frame ) { |
|
|
63
|
+ $parser->setHook( 'noglossary', function( $input, array $args, \Parser $parser, \PPFrame $frame ) { |
|
64
|
64
|
$output = $parser->recursiveTagParse( $input, $frame ); |
|
65
|
65
|
return '<span class="noglossary">' . $output . '</span>'; |
|
66
|
66
|
} ); |
|
@@ -68,7 +68,7 @@ discard block |
|
|
block discarded – undo |
|
68
|
68
|
return true; |
|
69
|
69
|
} ); |
|
70
|
70
|
|
|
71
|
|
- \Hooks::register( 'SpecialPageBeforeExecute', function ( \SpecialPage $specialPage, $subPage ) { |
|
|
71
|
+ \Hooks::register( 'SpecialPageBeforeExecute', function( \SpecialPage $specialPage, $subPage ) { |
|
72
|
72
|
|
|
73
|
73
|
if ( $specialPage instanceof \SpecialVersion ) { |
|
74
|
74
|
foreach ( $GLOBALS[ 'wgExtensionCredits' ][ 'parserhook' ] as $index => $description ) { |