Merge "Fixed dependencies for jquery.collapsibleTabs"
[lhc/web/wiklou.git] / maintenance / preprocessDump.php
index 5952fd9..87fc997 100644 (file)
@@ -78,8 +78,14 @@ class PreprocessDump extends DumpIterator {
         * @param $rev Revision
         */
        public function processRevision( $rev ) {
+               $content = $rev->getContent( Revision::RAW );
+
+               if ( $content->getModel() !== CONTENT_MODEL_WIKITEXT ) {
+                       return;
+               }
+
                try {
-                       $this->mPreprocessor->preprocessToObj( $rev->getText(), 0 );
+                       $this->mPreprocessor->preprocessToObj( strval( $content->getNativeData() ), 0 );
                }
                catch(Exception $e) {
                        $this->error("Caught exception " . $e->getMessage() . " in " . $rev->getTitle()->getPrefixedText() );