From: Chad Horohoe Date: Sun, 17 Nov 2013 02:03:11 +0000 (-0800) Subject: Remove ugly $wgTitle usage from edit.php maintenance script X-Git-Tag: 1.31.0-rc.0~17702^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=41a6bd786ee27bbb9776ac0c0a7d7f5ecc91216c;p=lhc%2Fweb%2Fwiklou.git Remove ugly $wgTitle usage from edit.php maintenance script Change-Id: Iae44d0945a10832a7f6585d3620c8e994783457b --- diff --git a/maintenance/edit.php b/maintenance/edit.php index 7c24f0fab7..6e696513b8 100644 --- a/maintenance/edit.php +++ b/maintenance/edit.php @@ -42,7 +42,7 @@ class EditCLI extends Maintenance { } public function execute() { - global $wgUser, $wgTitle; + global $wgUser; $userName = $this->getOption( 'user', 'Maintenance script' ); $summary = $this->getOption( 'summary', '' ); @@ -61,17 +61,17 @@ class EditCLI extends Maintenance { $wgUser->addToDatabase(); } - $wgTitle = Title::newFromText( $this->getArg() ); - if ( !$wgTitle ) { + $title = Title::newFromText( $this->getArg() ); + if ( !$title ) { $this->error( "Invalid title", true ); } - $context->setTitle( $wgTitle ); + $context->setTitle( $title ); - $page = WikiPage::factory( $wgTitle ); + $page = WikiPage::factory( $title ); # Read the text $text = $this->getStdin( Maintenance::STDIN_ALL ); - $content = ContentHandler::makeContent( $text, $wgTitle ); + $content = ContentHandler::makeContent( $text, $title ); # Do the edit $this->output( "Saving... " );