Gergő Tisza has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/302861

Change subject: Record global rename parameters in log entry
......................................................................

Record global rename parameters in log entry

Change-Id: Ie34dd55eb3c2992a39f8151368f92f6cb004bee6
---
M includes/GlobalRename/GlobalRenameUser.php
M includes/GlobalRename/GlobalRenameUserLogger.php
2 files changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/61/302861/1

diff --git a/includes/GlobalRename/GlobalRenameUser.php 
b/includes/GlobalRename/GlobalRenameUser.php
index f210dc1..bc2cb06 100644
--- a/includes/GlobalRename/GlobalRenameUser.php
+++ b/includes/GlobalRename/GlobalRenameUser.php
@@ -143,7 +143,7 @@
                $this->logger->log(
                        $this->oldUser->getName(),
                        $this->newUser->getName(),
-                       $options['reason']
+                       $options
                );
 
                return Status::newGood();
diff --git a/includes/GlobalRename/GlobalRenameUserLogger.php 
b/includes/GlobalRename/GlobalRenameUserLogger.php
index a1d1a3d..44c8e40 100644
--- a/includes/GlobalRename/GlobalRenameUserLogger.php
+++ b/includes/GlobalRename/GlobalRenameUserLogger.php
@@ -23,9 +23,9 @@
        /**
         * @param string $oldName
         * @param string $newName
-        * @param string $reason
+        * @param array $options
         */
-       public function log( $oldName, $newName, $reason ) {
+       public function log( $oldName, $newName, $options ) {
                $logEntry = new ManualLogEntry( 'gblrename', 'rename' );
                $logEntry->setPerformer( $this->performingUser );
 
@@ -33,10 +33,12 @@
                        Title::makeTitleSafe( NS_SPECIAL, 'CentralAuth/' . 
$newName )
                );
 
-               $logEntry->setComment( $reason );
+               $logEntry->setComment( $options['reason'] );
                $logEntry->setParameters( array(
                        '4::olduser' => $oldName,
                        '5::newuser' => $newName,
+                       'movepages' => $options['movepages'],
+                       'suppressredirects' => $options['suppressredirects'],
                ) );
 
                $logEntry->setRelations( array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie34dd55eb3c2992a39f8151368f92f6cb004bee6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: GergÅ‘ Tisza <[email protected]>

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

Reply via email to