Ricordisamoa has uploaded a new change for review.
https://gerrit.wikimedia.org/r/233110
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/10/233110/1
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: newchange
Gerrit-Change-Id: Ia96bbcdc7ac8ad536308b097d444e02738c4d3f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits