Remove RequestContext from edit.php and fixDoubleRedirects.php
authorwithoutaname <drevitchi@gmail.com>
Mon, 21 Jul 2014 22:10:25 +0000 (15:10 -0700)
committerHashar <hashar@free.fr>
Wed, 23 Jul 2014 20:30:08 +0000 (20:30 +0000)
Change-Id: I9388e6b3fec3c8ea92099aeaf010dd067f62a20f

maintenance/edit.php
maintenance/fixDoubleRedirects.php

index 6bdb15d..75ec12b 100644 (file)
@@ -54,8 +54,6 @@ 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 );
                }
@@ -67,7 +65,6 @@ class EditCLI extends Maintenance {
                if ( !$title ) {
                        $this->error( "Invalid title", true );
                }
-               $context->setTitle( $title );
 
                if ( $this->hasOption( 'nocreate' ) && !$title->exists() ) {
                        $this->error( "Page does not exist", true );
index a678a92..9568284 100644 (file)
@@ -96,7 +96,6 @@ class FixDoubleRedirects extends Maintenance {
                foreach ( $res as $row ) {
                        $titleA = Title::makeTitle( $row->pa_namespace, $row->pa_title );
                        $titleB = Title::makeTitle( $row->pb_namespace, $row->pb_title );
-                       RequestContext::getMain()->setTitle( $titleA );
 
                        $processedTitles .= "* [[$titleA]]\n";