X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FpreprocessDump.php;h=d540e8f9020355b80289ef154d8a557f44739ef5;hp=683de45802ff05f46873811d1dbb7834e2f4474c;hb=74426f3cf796b149f1ae445e41815bbe148640b2;hpb=5aaadefd99181f7e08e43aeb90e76c94b20a030e diff --git a/maintenance/preprocessDump.php b/maintenance/preprocessDump.php index 683de45802..d540e8f902 100644 --- a/maintenance/preprocessDump.php +++ b/maintenance/preprocessDump.php @@ -41,6 +41,7 @@ class PreprocessDump extends DumpIterator { public function getStripList() { global $wgParser; + return $wgParser->getStripList(); } @@ -66,7 +67,7 @@ class PreprocessDump extends DumpIterator { } elseif ( isset( $wgParserConf['preprocessorClass'] ) ) { $name = $wgParserConf['preprocessorClass']; } else { - $name = 'Preprocessor_DOM'; + $name = Preprocessor_DOM::class; } $wgParser->firstCallInit(); @@ -75,7 +76,7 @@ class PreprocessDump extends DumpIterator { /** * Callback function for each revision, preprocessToObj() - * @param $rev Revision + * @param Revision $rev */ public function processRevision( $rev ) { $content = $rev->getContent( Revision::RAW ); @@ -87,10 +88,11 @@ class PreprocessDump extends DumpIterator { try { $this->mPreprocessor->preprocessToObj( strval( $content->getNativeData() ), 0 ); } catch ( Exception $e ) { - $this->error( "Caught exception " . $e->getMessage() . " in " . $rev->getTitle()->getPrefixedText() ); + $this->error( "Caught exception " . $e->getMessage() . " in " + . $rev->getTitle()->getPrefixedText() ); } } } -$maintClass = "PreprocessDump"; +$maintClass = PreprocessDump::class; require_once RUN_MAINTENANCE_IF_MAIN;