jenkins-bot has submitted this change and it was merged.

Change subject: LocalRenameUserJob: Don't try to construct the old user object 
twice
......................................................................


LocalRenameUserJob: Don't try to construct the old user object twice

movePages() would fatal on invalid usernames, so just pass the already
constructed User object to it.

Change-Id: Idf969e77579067cf385f0ef4222343b8ba288fb2
(cherry picked from commit 525899f3baa770178590fd398980581ab5986b9e)
---
M includes/LocalRenameJob/LocalRenameUserJob.php
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/LocalRenameJob/LocalRenameUserJob.php 
b/includes/LocalRenameJob/LocalRenameUserJob.php
index fea5825..3961532 100644
--- a/includes/LocalRenameJob/LocalRenameUserJob.php
+++ b/includes/LocalRenameJob/LocalRenameUserJob.php
@@ -72,7 +72,7 @@
                }
 
                if ( $this->params['movepages'] ) {
-                       $this->movePages();
+                       $this->movePages( $oldUser );
                }
 
                if ( $this->params['promotetoglobal'] ) {
@@ -102,11 +102,11 @@
        /**
         * Queue up jobs to move pages
         */
-       public function movePages() {
+       public function movePages( User $oldUser ) {
                $from = $this->params['from'];
                $to = $this->params['to'];
 
-               $fromTitle = User::newFromName( $from )->getUserPage();
+               $fromTitle = $oldUser->getUserPage();
                $toTitle = Title::makeTitleSafe( NS_USER, $to );
                $dbr = wfGetDB( DB_SLAVE );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/209490
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf969e77579067cf385f0ef4222343b8ba288fb2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: wmf/1.26wmf4
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to