Use canonical parser option for linkupdate in api purge
authorumherirrender <umherirrender_de.wp@web.de>
Fri, 22 Jun 2012 22:25:33 +0000 (00:25 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Fri, 22 Jun 2012 22:25:33 +0000 (00:25 +0200)
This patch makes sure, that the links table updated against the
content language. This also enabled the limit report, which than
is also stored in the parser cache along with the html.

Change-Id: I2a0b09d7250813809f1b2a8cba3e4f53a6686002

includes/api/ApiPurge.php

index e27068d..d9acba4 100644 (file)
@@ -88,8 +88,7 @@ class ApiPurge extends ApiBase {
                                if ( !$user->pingLimiter() ) {
                                        global $wgParser, $wgEnableParserCache;
 
-                                       $popts = ParserOptions::newFromContext( $this->getContext() );
-                                       $popts->setTidy( true );
+                                       $popts = $page->makeParserOptions( 'canonical' );
                                        $p_result = $wgParser->parse( $page->getRawText(), $title, $popts,
                                                true, true, $page->getLatest() );