Completed
Branch master (2df768)
by Stephan
03:18
created
Category
PurgePage.magic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,5 +2,5 @@
 block discarded – undo
2 2
 $magicWords = array();
3 3
 
4 4
 $magicWords['en'] = array(
5
-	'purge' => array( 0, 'purge' ),
5
+	'purge' => array(0, 'purge'),
6 6
 );
Please login to merge, or discard this patch.
PurgePage.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,20 +8,20 @@
 block discarded – undo
8 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 ( $parser ) {
13
+		$parser->setFunctionHook('purge', function($parser) {
14 14
 
15 15
 			$params = func_get_args();
16 16
 
17
-			if ( isset( $params[ 0 ] ) && isset( $params[ 1 ] ) ) {
18
-				$pageName = $params[ 1 ];
17
+			if (isset($params[0]) && isset($params[1])) {
18
+				$pageName = $params[1];
19 19
 			}
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
 		} );
Please login to merge, or discard this patch.