Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Get rid of getPrefixedId in ExternalChangesLine
......................................................................

Get rid of getPrefixedId in ExternalChangesLine

Change-Id: I07e69dc9b5b20b0d29db2ac02618ef4867083fa1
---
M client/includes/recentchanges/ExternalChangesLine.php
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/38/77338/1

diff --git a/client/includes/recentchanges/ExternalChangesLine.php 
b/client/includes/recentchanges/ExternalChangesLine.php
index ff02ba4..68d9a7e 100644
--- a/client/includes/recentchanges/ExternalChangesLine.php
+++ b/client/includes/recentchanges/ExternalChangesLine.php
@@ -394,10 +394,12 @@
                                $entityId = new EntityId( $entityType, (int)$id 
);
                        }
                        else {
-                               $entityId = EntityId::newFromPrefixedId( $id );
+                               $idParser = 
WikibaseClient::getDefaultInstance()->getEntityIdParser();
+                               $entityId = $idParser->parse( $id );
                        }
 
-                       $titleText = strtoupper( $entityId->getPrefixedId() );
+                       $idFormatter = 
WikibaseClient::getDefaultInstance()->getEntityIdFormatter();
+                       $titleText = strtoupper( $idFormatter->format( 
$entityId ) );
 
                        if ( $includeNamespace ) {
                                $repoLinker = 
WikibaseClient::getDefaultInstance()->newRepoLinker();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07e69dc9b5b20b0d29db2ac02618ef4867083fa1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>

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

Reply via email to