Use WikiPage instead of Article to call doEdit()
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 29 Dec 2011 18:51:23 +0000 (18:51 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 29 Dec 2011 18:51:23 +0000 (18:51 +0000)
maintenance/edit.php

index fb462a4..8857371 100644 (file)
@@ -58,14 +58,14 @@ class EditCLI extends Maintenance {
                        $this->error( "Invalid title", true );
                }
 
-               $article = new Article( $wgTitle );
+               $page = WikiPage::factory( $wgTitle );
 
                # Read the text
                $text = $this->getStdin( Maintenance::STDIN_ALL );
 
                # Do the edit
                $this->output( "Saving... " );
-               $status = $article->doEdit( $text, $summary,
+               $status = $page->doEdit( $text, $summary,
                        ( $minor ? EDIT_MINOR : 0 ) |
                        ( $bot ? EDIT_FORCE_BOT : 0 ) |
                        ( $autoSummary ? EDIT_AUTOSUMMARY : 0 ) |