jenkins-bot has submitted this change and it was merged.
Change subject: Correctly populate pageset in ApiQueryGeoSearchElastic
......................................................................
Correctly populate pageset in ApiQueryGeoSearchElastic
When using ApiPageSet::populateFromQueryResult(), the query must contain
all the columns returned by that instance's
ApiPageSet::getPageTableFields().
Bug: 72764
Change-Id: Ic49e2b1b2b6e1cc6dac0d710df5249cedd90a55f
(cherry picked from commit 7e2c6ba23908358fb22b457680fe63c6901c6cad)
---
M api/ApiQueryGeoSearchElastic.php
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Reedy: Looks good to me, approved
jenkins-bot: Verified
diff --git a/api/ApiQueryGeoSearchElastic.php b/api/ApiQueryGeoSearchElastic.php
index 5949b24..689cf31 100644
--- a/api/ApiQueryGeoSearchElastic.php
+++ b/api/ApiQueryGeoSearchElastic.php
@@ -126,7 +126,11 @@
}
$this->addWhere( array( 'page_id' => array_keys( $ids )
) );
$this->addTables( 'page' );
- $this->addFields( array( 'page_id', 'page_title',
'page_namespace' ) );
+ if ( is_null( $resultPageSet ) ) {
+ $this->addFields( array( 'page_id',
'page_title', 'page_namespace' ) );
+ } else {
+ $this->addFields(
$resultPageSet->getPageTableFields() );
+ }
wfProfileIn( __METHOD__ . '-sql' );
$res = $this->select( __METHOD__ );
--
To view, visit https://gerrit.wikimedia.org/r/171776
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic49e2b1b2b6e1cc6dac0d710df5249cedd90a55f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: wmf/1.25wmf6
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits