From 982b2ae1b48e4a4113d1efeb15798c497d69d048 Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Thu, 6 Jun 2013 21:20:20 +0100 Subject: [PATCH] edit.php maintenance script not setting up context, just globals Was breaking one of Echo's hooks Bug: 49271 Change-Id: Ie1b5f5bc4a672bcfff3c99b9a76b37c502c09985 --- maintenance/edit.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/maintenance/edit.php b/maintenance/edit.php index 7fca6518bf..7c24f0fab7 100644 --- a/maintenance/edit.php +++ b/maintenance/edit.php @@ -52,6 +52,8 @@ class EditCLI extends Maintenance { $noRC = $this->hasOption( 'no-rc' ); $wgUser = User::newFromName( $userName ); + $context = RequestContext::getMain(); + $context->setUser( $wgUser ); if ( !$wgUser ) { $this->error( "Invalid username", true ); } @@ -63,6 +65,7 @@ class EditCLI extends Maintenance { if ( !$wgTitle ) { $this->error( "Invalid title", true ); } + $context->setTitle( $wgTitle ); $page = WikiPage::factory( $wgTitle ); -- 2.20.1