Merge "Implement static public Parser::getExternalLinkRel"
[lhc/web/wiklou.git] / includes / Import.php
index 2746382..2017466 100644 (file)
@@ -429,6 +429,7 @@ class WikiImporter {
 
        /**
         * Primary entry point
+        * @throws MWException
         * @return bool
         */
        public function doImport() {
@@ -659,7 +660,7 @@ class WikiImporter {
                if ( isset( $revisionInfo['model'] ) ) {
                        $revision->setModel( $revisionInfo['model'] );
                }
-               if ( isset( $revisionInfo['text'] ) ) {
+               if ( isset( $revisionInfo['format'] ) ) {
                        $revision->setFormat( $revisionInfo['format'] );
                }
                $revision->setTitle( $pageInfo['_title'] );
@@ -1214,7 +1215,7 @@ class WikiRevision {
         * @deprecated Since 1.21, use getContent() instead.
         */
        function getText() {
-               wfDeprecated( "Use getContent() instead." );
+               ContentHandler::deprecated( __METHOD__, '1.21' );
 
                return $this->text;
        }
@@ -1396,6 +1397,7 @@ class WikiRevision {
                # @todo FIXME: Use original rev_id optionally (better for backups)
                # Insert the row
                $revision = new Revision( array(
+                       'title'      => $this->title,
                        'page'       => $pageId,
                        'content_model'  => $this->getModel(),
                        'content_format' => $this->getFormat(),