@@ -5,23 +5,23 @@ |
||
5 | 5 | class PurgePage { |
6 | 6 | |
7 | 7 | public static function init() { |
8 | - $GLOBALS[ 'wgExtensionMessagesFiles' ][ 'PurgePageMagic' ] = __DIR__ . '/PurgePage.magic.php'; |
|
8 | + $GLOBALS['wgExtensionMessagesFiles']['PurgePageMagic'] = __DIR__ . '/PurgePage.magic.php'; |
|
9 | 9 | } |
10 | 10 | |
11 | - public static function registerParserFunction( \Parser &$parser ) { |
|
11 | + public static function registerParserFunction(\Parser&$parser) { |
|
12 | 12 | |
13 | - $parser->setFunctionHook( 'purge', function () { |
|
13 | + $parser->setFunctionHook('purge', function() { |
|
14 | 14 | |
15 | 15 | $params = func_get_args(); |
16 | 16 | |
17 | - if ( isset( $params[ 1 ] ) ) { |
|
17 | + if (isset($params[1])) { |
|
18 | 18 | |
19 | - $pageName = $params[ 1 ]; |
|
19 | + $pageName = $params[1]; |
|
20 | 20 | |
21 | - $title = \Title::newFromText( $pageName ); |
|
21 | + $title = \Title::newFromText($pageName); |
|
22 | 22 | |
23 | - if ( $title->isContentPage() && $title->exists() ) { |
|
24 | - \WikiPage::factory( $title )->doPurge(); |
|
23 | + if ($title->isContentPage() && $title->exists()) { |
|
24 | + \WikiPage::factory($title)->doPurge(); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | } |