Ladsgroup has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/361543 )
Change subject: [DNM][Code experiment] Use local part of entity id
......................................................................
[DNM][Code experiment] Use local part of entity id
Change-Id: Id7eabc5730ef342d9a690533569059751b6c920d
---
M lib/includes/Store/Sql/SqlEntityInfoBuilder.php
1 file changed, 6 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/43/361543/1
diff --git a/lib/includes/Store/Sql/SqlEntityInfoBuilder.php
b/lib/includes/Store/Sql/SqlEntityInfoBuilder.php
index 7437598..32d161a 100644
--- a/lib/includes/Store/Sql/SqlEntityInfoBuilder.php
+++ b/lib/includes/Store/Sql/SqlEntityInfoBuilder.php
@@ -603,8 +603,11 @@
if ( isset( $this->pageInfoByType[$entityType] ) ) {
return $this->pageInfoByType[$entityType];
}
- $entityIds = $this->numericIdsByType[$entityType];
-
+ $entityIds = [];
+ foreach ( $this->numericIdsByType[$entityType] as
$entityIdSerialization => $value ) {
+ $parts = EntityId::splitSerialization(
$entityIdSerialization );
+ $entityIds[] = EntityId::joinSerialization( [ '',
$parts[1], $parts[2] ] );
+ }
$dbr = $this->getConnection( DB_REPLICA );
$fields = [
@@ -619,7 +622,7 @@
$fields,
[
'page_namespace' =>
$this->entityNamespaceLookup->getEntityNamespace( $entityType ),
- 'page_title' => array_keys( $entityIds ),
+ 'page_title' => $entityIds,
],
__METHOD__,
[],
--
To view, visit https://gerrit.wikimedia.org/r/361543
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7eabc5730ef342d9a690533569059751b6c920d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits