* Use WikiPage instead of Article to call doEdit()
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 15 Jan 2012 12:30:14 +0000 (12:30 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 15 Jan 2012 12:30:14 +0000 (12:30 +0000)
* Pass the User object to WikiPage::doEdit()

maintenance/importTextFile.php

index b78ae03..ec9ff00 100644 (file)
@@ -57,8 +57,8 @@ if ( count( $args ) < 1 || isset( $options['help'] ) ) {
                                        $flags = 0 | ( isset( $options['norc'] ) ? EDIT_SUPPRESS_RC : 0 );
 
                                        echo( "\nPerforming edit..." );
-                                       $article = new Article( $title );
-                                       $article->doEdit( $text, $comment, $flags );
+                                       $page = WikiPage::factory( $title );
+                                       $page->doEdit( $text, $comment, $flags, false, $user );
                                        echo( "done.\n" );
 
                                } else {