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

Change subject: Link to property pages in statement diffs
......................................................................


Link to property pages in statement diffs

Changed EntityContentDiffView to use EntityIdHtmlLinkFormatter
instead of EscapingEntityIdFormatter.

Bug: T105411
Change-Id: Ia96bbcdc7ac8ad536308b097d444e02738c4d3f5
---
M repo/includes/Diff/EntityContentDiffView.php
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/includes/Diff/EntityContentDiffView.php 
b/repo/includes/Diff/EntityContentDiffView.php
index 3a7529d..f74b1f5 100644
--- a/repo/includes/Diff/EntityContentDiffView.php
+++ b/repo/includes/Diff/EntityContentDiffView.php
@@ -17,8 +17,6 @@
 use ValueFormatters\FormatterOptions;
 use ValueFormatters\ValueFormatter;
 use Wikibase\DataModel\Services\EntityId\EntityIdFormatter;
-use Wikibase\DataModel\Services\EntityId\EntityIdLabelFormatter;
-use Wikibase\DataModel\Services\EntityId\EscapingEntityIdFormatter;
 use Wikibase\DataModel\Services\Lookup\EntityRetrievingTermLookup;
 use Wikibase\DataModel\Services\Lookup\LanguageLabelDescriptionLookup;
 use Wikibase\EntityContent;
@@ -84,9 +82,9 @@
 
                $termLookup = new EntityRetrievingTermLookup( 
$wikibaseRepo->getEntityLookup() );
                $labelDescriptionLookup = new LanguageLabelDescriptionLookup( 
$termLookup, $langCode );
-               $labelFormatter = new EntityIdLabelFormatter( 
$labelDescriptionLookup );
 
-               $this->propertyNameFormatter = new EscapingEntityIdFormatter( 
$labelFormatter, 'htmlspecialchars' );
+               $htmlFormatterFactory = 
$wikibaseRepo->getEntityIdHtmlLinkFormatterFactory();
+               $this->propertyNameFormatter = 
$htmlFormatterFactory->getEntityIdFormater( $labelDescriptionLookup );
 
                $formatterFactory = $wikibaseRepo->getSnakFormatterFactory();
                $this->detailedSnakFormatter = 
$formatterFactory->getSnakFormatter( SnakFormatter::FORMAT_HTML_DIFF, $options 
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia96bbcdc7ac8ad536308b097d444e02738c4d3f5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Lydia Pintscher <[email protected]>
Gerrit-Reviewer: Ricordisamoa <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to