Play safe and clear the article object internals, too (eg. mTouched).
[lhc/web/wiklou.git] / maintenance / edit.php
index 307570f..30dfee1 100644 (file)
@@ -36,7 +36,7 @@ class EditCLI extends Maintenance {
        }
 
        public function execute() {
-               global $wgUser, $wgArticle;
+               global $wgUser;
 
                $userName = $this->getOption( 'u', 'Maintenance script' );
                $summary = $this->getOption( 's', '' );
@@ -58,14 +58,14 @@ class EditCLI extends Maintenance {
                        $this->error( "Invalid title", true );
                }
 
-               $wgArticle = new Article( $title );
+               $article = new Article( $title );
 
                # Read the text
                $text = $this->getStdin( Maintenance::STDIN_ALL );
 
                # Do the edit
                $this->output( "Saving... " );
-               $status = $wgArticle->doEdit( $text, $summary,
+               $status = $article->doEdit( $text, $summary,
                        ( $minor ? EDIT_MINOR : 0 ) |
                        ( $bot ? EDIT_FORCE_BOT : 0 ) |
                        ( $autoSummary ? EDIT_AUTOSUMMARY : 0 ) |