getStripList(); } public function __construct() { parent::__construct(); $this->addOption( 'cache', 'Use and populate the preprocessor cache.', false, false ); $this->addOption( 'preprocessor', 'Preprocessor to use.', false, false ); } public function getDbType() { return Maintenance::DB_NONE; } public function checkOptions() { global $wgParser, $wgParserConf, $wgPreprocessorCacheThreshold; if ( !$this->hasOption( 'cache' ) ) { $wgPreprocessorCacheThreshold = false; } if ( $this->hasOption( 'preprocessor' ) ) { $name = $this->getOption( 'preprocessor' ); } elseif ( isset( $wgParserConf['preprocessorClass'] ) ) { $name = $wgParserConf['preprocessorClass']; } else { $name = 'Preprocessor_DOM'; } $wgParser->firstCallInit(); $this->mPreprocessor = new $name( $this ); } /** * Callback function for each revision, preprocessToObj() * @param $rev Revision */ public function processRevision( $rev ) { try { $this->mPreprocessor->preprocessToObj( $rev->getText(), 0 ); } catch(Exception $e) { $this->error("Caught exception " . $e->getMessage() . " in " . $rev->getTitle()->getPrefixedText() ); } } } $maintClass = "PreprocessDump"; require_once( RUN_MAINTENANCE_IF_MAIN );