Cleanup for r27897:
[lhc/web/wiklou.git] / includes / SpecialImport.php
index 0dd25e7..64aa4cb 100644 (file)
@@ -193,13 +193,13 @@ class ImportReporter {
                if( $successCount > 0 ) {
                        $log = new LogPage( 'import' );
                        if( $this->mIsUpload ) {
-                               $detail = wfMsgForContent( 'import-logentry-upload-detail',
+                               $detail = wfMsgExt( 'import-logentry-upload-detail', array( 'content', 'parsemag' ),
                                        $contentCount );
                                $log->addEntry( 'upload', $title, $detail );
                        } else {
                                $interwiki = '[[:' . $this->mInterwiki . ':' .
                                        $origTitle->getPrefixedText() . ']]';
-                               $detail = wfMsgForContent( 'import-logentry-interwiki-detail',
+                               $detail = wfMsgExt( 'import-logentry-interwiki-detail', array( 'content', 'parsemag' ),
                                        $contentCount, $interwiki );
                                $log->addEntry( 'interwiki', $title, $detail );
                        }
@@ -208,17 +208,10 @@ class ImportReporter {
                        $dbw = wfGetDB( DB_MASTER );
                        $nullRevision = Revision::newNullRevision(
                                $dbw, $title->getArticleId(), $comment, true );
-                       $nullRevId = $nullRevision->insertOn( $dbw );
-                       
+                       $nullRevision->insertOn( $dbw );
                        # Update page record
-                       $dbw->update( 'page',
-                               array( /* SET */
-                                       'page_touched' => $dbw->timestamp(),
-                                       'page_latest' => $nullRevId
-                               ), array( /* WHERE */
-                                       'page_id' => $title->getArticleId()
-                               ), __METHOD__
-                       );
+                       $article = new Article( $title );
+                       $article->updateRevisionOn( $dbw, $nullRevision );
                }
        }