Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/215053
Change subject: Ignore modifier when looking up usages. ...................................................................... Ignore modifier when looking up usages. This provides forward-compatibility for a situation where the database already contains "modified" usage aspects (including the language codes), but the code was for some reason reverted to a state where such modifiers would not yet be expected to be present in the database. Change-Id: I03e5df6cf842928b263715cfb710a20430f1ad4a --- M client/includes/Usage/Sql/SqlUsageTracker.php 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/53/215053/1 diff --git a/client/includes/Usage/Sql/SqlUsageTracker.php b/client/includes/Usage/Sql/SqlUsageTracker.php index 8784cae..4f334ec 100644 --- a/client/includes/Usage/Sql/SqlUsageTracker.php +++ b/client/includes/Usage/Sql/SqlUsageTracker.php @@ -218,7 +218,9 @@ foreach ( $rows as $object ) { $entityId = $this->idParser->parse( $object->eu_entity_id ); - $usage = new EntityUsage( $entityId, $object->eu_aspect ); + list( $aspect, ) = EntityUsage::splitAspectKey( $object->eu_aspect ); + + $usage = new EntityUsage( $entityId, $aspect ); $key = $usage->getIdentityString(); $usages[$key] = $usage; } @@ -282,7 +284,9 @@ } $entityId = $this->idParser->parse( $row->eu_entity_id ); - $usage = new EntityUsage( $entityId, $row->eu_aspect ); + list( $aspect, ) = EntityUsage::splitAspectKey( $row->eu_aspect ); + + $usage = new EntityUsage( $entityId, $aspect ); $pageEntityUsages->addUsages( array( $usage ) ); $usagesPerPage[$pageId] = $pageEntityUsages; -- To view, visit https://gerrit.wikimedia.org/r/215053 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I03e5df6cf842928b263715cfb710a20430f1ad4a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler <daniel.kinz...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits