Revert r66977 (removing $wgTitle from edit.php). This doesn't break core, but could...
authorChad Horohoe <demon@users.mediawiki.org>
Sun, 6 Feb 2011 22:36:33 +0000 (22:36 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Sun, 6 Feb 2011 22:36:33 +0000 (22:36 +0000)
maintenance/edit.php

index 0e82426..40623af 100644 (file)
@@ -36,7 +36,7 @@ class EditCLI extends Maintenance {
        }
 
        public function execute() {
-               global $wgUser;
+               global $wgUser, $wgTitle;
 
                $userName = $this->getOption( 'u', 'Maintenance script' );
                $summary = $this->getOption( 's', '' );
@@ -53,12 +53,12 @@ class EditCLI extends Maintenance {
                        $wgUser->addToDatabase();
                }
 
-               $title = Title::newFromText( $this->getArg() );
-               if ( !$title ) {
+               $wgTitle = Title::newFromText( $this->getArg() );
+               if ( !$wgTitle ) {
                        $this->error( "Invalid title", true );
                }
 
-               $article = new Article( $title );
+               $article = new Article( $wgTitle );
 
                # Read the text
                $text = $this->getStdin( Maintenance::STDIN_ALL );