jenkins-bot has submitted this change and it was merged. Change subject: Use the correct GROUP_CONCAT syntax in SpecialEntityUsage ......................................................................
Use the correct GROUP_CONCAT syntax in SpecialEntityUsage In the old method it would catch all aspects regardless of the page: https://test.wikipedia.org/wiki/Special:EntityUsage/Q377 That was my fault, sorry Bug: T147671 Change-Id: Ib23a348034acc8f8d072d96b36dafb9717c1c421 --- M client/includes/Specials/SpecialEntityUsage.php 1 file changed, 9 insertions(+), 8 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/Specials/SpecialEntityUsage.php b/client/includes/Specials/SpecialEntityUsage.php index 0820dec..7451b5f 100644 --- a/client/includes/Specials/SpecialEntityUsage.php +++ b/client/includes/Specials/SpecialEntityUsage.php @@ -53,7 +53,8 @@ * @param string $subPage */ public function execute( $subPage ) { - $this->prepareParams( $subPage ); + $entity = $this->getRequest()->getText( 'entity', $subPage ); + $this->prepareParams( $entity ); if ( $this->entityId !== null ) { parent::execute( $subPage ); @@ -65,11 +66,9 @@ } /** - * @param string $subPage + * @param string $entity */ - private function prepareParams( $subPage ) { - $entity = $this->getRequest()->getText( 'entity', $subPage ); - + public function prepareParams( $entity ) { if ( $entity ) { try { $this->entityId = $this->idParser->parse( $entity ); @@ -128,9 +127,11 @@ public function getQueryInfo() { $joinConds = [ 'wbc_entity_usage' => [ 'JOIN', [ 'page_id = eu_page_id' ] ] ]; $conds = [ 'eu_entity_id' => $this->entityId->getSerialization() ]; - $groupConcat = wfGetDB( DB_REPLICA ) - ->buildGroupConcatField( '|', 'wbc_entity_usage', - 'eu_aspect', $conds, $joinConds + $groupConcat = wfGetDB( DB_REPLICA )->buildGroupConcatField( + '|', + 'wbc_entity_usage', + 'eu_aspect', + [ 'eu_page_id = page_id' ] + $conds ); return [ -- To view, visit https://gerrit.wikimedia.org/r/314322 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib23a348034acc8f8d072d96b36dafb9717c1c421 Gerrit-PatchSet: 7 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Ladsgroup <ladsgr...@gmail.com> Gerrit-Reviewer: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: Daniel Kinzler <daniel.kinz...@wikimedia.de> Gerrit-Reviewer: Hoo man <h...@online.de> Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com> Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> Gerrit-Reviewer: WMDE-leszek <leszek.mani...@wikimedia.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits