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

Change subject: Fixup hardcoded usages of "User:" in CentralAuth
......................................................................


Fixup hardcoded usages of "User:" in CentralAuth

Bug: 48283
Change-Id: I51a6dd5a8345f35b6eff2f1e2a41b3bb1c29ceaa
---
M CentralAuthHooks.php
M CentralAuthUser.php
M specials/SpecialCentralAuth.php
M specials/SpecialMergeAccount.php
4 files changed, 14 insertions(+), 5 deletions(-)

Approvals:
  Hoo man: Verified; Looks good to me, approved
  Alex Monk: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/CentralAuthHooks.php b/CentralAuthHooks.php
index 6dc45d1..a07bc1c 100644
--- a/CentralAuthHooks.php
+++ b/CentralAuthHooks.php
@@ -883,7 +883,7 @@
                        $params['domain'] = $parts[2];
                }
                $params['properties']['ca-local-url'] = $params['url'];
-               $params['url'] = $wiki->getUrl( 'User:' . $user->getTitleKey() 
);
+               $params['url'] = $wiki->getUrl( MWNamespace::getCanonicalName( 
NS_USER ) . ':' . $user->getTitleKey() );
                return true;
        }
 
diff --git a/CentralAuthUser.php b/CentralAuthUser.php
index 93c1294..e4b3d77 100644
--- a/CentralAuthUser.php
+++ b/CentralAuthUser.php
@@ -2396,6 +2396,13 @@
                // Not centralauth because of some weird length limitiations
                $logType = $suppressLog ? 'suppress' : 'globalauth';
                $log = new LogPage( $logType );
-               $log->addEntry( $action, Title::newFromText( 
"User:{$this->mName}@global" ), $reason, $params );
+               $log->addEntry(
+                       $action,
+                       Title::newFromText(
+                               MWNamespace::getCanonicalName( NS_USER ) . 
":{$this->mName}@global"
+                       ),
+                       $reason,
+                       $params
+               );
        }
 }
diff --git a/specials/SpecialCentralAuth.php b/specials/SpecialCentralAuth.php
index 70de5c8..8b603e6 100644
--- a/specials/SpecialCentralAuth.php
+++ b/specials/SpecialCentralAuth.php
@@ -550,7 +550,7 @@
                $wikiname = $wiki->getDisplayName();
                return self::foreignLink(
                        $wiki,
-                       'User:' . $this->mUserName,
+                       MWNamespace::getCanonicalName( NS_USER ) . ':' . 
$this->mUserName,
                        $wikiname,
                        $this->msg( 'centralauth-foreign-link', 
$this->mUserName, $wikiname )->text()
                );
@@ -676,7 +676,9 @@
                $numRows = LogEventsList::showLogExtract(
                        $text,
                        array( 'globalauth', 'suppress' ),
-                       Title::newFromText( "User:{$user}@global" 
)->getPrefixedText(),
+                       Title::newFromText(
+                               MWNamespace::getCanonicalName( NS_USER ) . 
":{$user}@global"
+                       )->getPrefixedText(),
                        '',
                        array( 'showIfEmpty' => true ) );
                if ( $numRows ) {
diff --git a/specials/SpecialMergeAccount.php b/specials/SpecialMergeAccount.php
index bd1bc6a..da4fcd5 100644
--- a/specials/SpecialMergeAccount.php
+++ b/specials/SpecialMergeAccount.php
@@ -465,7 +465,7 @@
                $wikiname = $wiki->getDisplayName();
                return SpecialCentralAuth::foreignLink(
                        $wiki,
-                       'User:' . $this->mUserName,
+                       MWNamespace::getCanonicalName( NS_USER ) . ':' . 
$this->mUserName,
                        $wikiname,
                        $this->msg( 'centralauth-foreign-link', 
$this->mUserName, $wikiname )->text()
                );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51a6dd5a8345f35b6eff2f1e2a41b3bb1c29ceaa
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: CSteipp <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Pgehres <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to