Addshore has uploaded a new change for review.
https://gerrit.wikimedia.org/r/230070
Change subject: Expose identifiers on Special:ListProperties
......................................................................
Expose identifiers on Special:ListProperties
Bug: T107882
Change-Id: I72416188d3d3545ff985d23b48ae15ae65f30627
---
M repo/includes/specials/SpecialListProperties.php
1 file changed, 9 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/70/230070/1
diff --git a/repo/includes/specials/SpecialListProperties.php
b/repo/includes/specials/SpecialListProperties.php
index 9a22633..07c2104 100644
--- a/repo/includes/specials/SpecialListProperties.php
+++ b/repo/includes/specials/SpecialListProperties.php
@@ -203,7 +203,15 @@
$entityIdFormatter = $this->getEntityIdFormater();
$labelDescriptionLookup = $this->getLabelDescriptionLookup();
- $row = $entityIdFormatter->formatEntityId( $propertyId );
+ $row = '';
+ try{
+ $labelDescriptionLookup->getLabel( $propertyId );
+ // If there is a label (no exception) then add the ID
to the row
+ $row .= $propertyId->getSerialization() . ' - ';
+ } catch ( OutOfBoundsException $e ) {
+ // If there is no label the ID will be in the link
+ }
+ $row .= $entityIdFormatter->formatEntityId( $propertyId );
try{
$row .= ' (' . $labelDescriptionLookup->getDescription(
$propertyId )->getText() . ')';
} catch ( OutOfBoundsException $e ) {
--
To view, visit https://gerrit.wikimedia.org/r/230070
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I72416188d3d3545ff985d23b48ae15ae65f30627
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits