From ebfcf8abc4f27328ec57308166d24b1d64da38cb Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Sun, 6 Feb 2011 22:36:33 +0000 Subject: [PATCH] Revert r66977 (removing $wgTitle from edit.php). This doesn't break core, but could quite possibly break extensions that expect $wgTitle to be set during editing. I hate $wgTitle :( --- maintenance/edit.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/maintenance/edit.php b/maintenance/edit.php index 0e82426742..40623afbc9 100644 --- a/maintenance/edit.php +++ b/maintenance/edit.php @@ -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 ); -- 2.20.1