jenkins-bot has submitted this change and it was merged.
Change subject: Return global user name from find API
......................................................................
Return global user name from find API
Wrong names were shown in translation conflict dialog because of this
Change-Id: I9af76a8238c878a754c83f63ca3cbec65c3866ad
---
M api/ApiQueryContentTranslation.php
M includes/GlobalUser.php
2 files changed, 7 insertions(+), 1 deletion(-)
Approvals:
Nikerabbit: Looks good to me, approved
jenkins-bot: Verified
diff --git a/api/ApiQueryContentTranslation.php
b/api/ApiQueryContentTranslation.php
index 3ea8167..9a1c12c 100644
--- a/api/ApiQueryContentTranslation.php
+++ b/api/ApiQueryContentTranslation.php
@@ -78,7 +78,9 @@
if ( $translation !== null ) {
$translator =
$translation->translation['lastUpdatedTranslator'];
$translation->translation['translatorName'] =
- User::newFromId( $translator )->getName();
+ ContentTranslation\GlobalUser::newFromUser(
+ User::newFromId( $translator )
+ )->getName();
$result->addValue(
array( 'query', 'contenttranslation' ),
'translation', $translation->translation
diff --git a/includes/GlobalUser.php b/includes/GlobalUser.php
index 781ab50..80d74a6 100644
--- a/includes/GlobalUser.php
+++ b/includes/GlobalUser.php
@@ -24,4 +24,8 @@
public function getId() {
return $this->user->getId();
}
+
+ public function getName() {
+ return $this->user->getName();
+ }
}
--
To view, visit https://gerrit.wikimedia.org/r/184584
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9af76a8238c878a754c83f63ca3cbec65c3866ad
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits