jenkins-bot has submitted this change and it was merged. Change subject: Page images return non-free images by default ......................................................................
Page images return non-free images by default Page images was updated to have a split between the 'best' page image, and the best free page image. Unfortunately the deployment plan didn't take into account that the default 'free' would be pointing to an unpopulated page prop, which will not be populated until LinksUpdate has run for every page on every wiki which could take weeks or months. To restore some semblance of order, make the default point at the currently populated field. A followup will need to be done to populate the appropriate field. Bug: T152155 Change-Id: I1d35e965dc37c8c4ecdcc43313b3198e951e1978 --- M includes/ApiQueryPageImages.php M tests/phpunit/ApiQueryPageImagesTest.php 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ApiQueryPageImages.php b/includes/ApiQueryPageImages.php index 5de31a4..a83f79d 100644 --- a/includes/ApiQueryPageImages.php +++ b/includes/ApiQueryPageImages.php @@ -250,7 +250,7 @@ 'license' => [ ApiBase::PARAM_TYPE => [ self::PARAM_LICENSE_FREE, self::PARAM_LICENSE_ANY ], ApiBase::PARAM_ISMULTI => false, - ApiBase::PARAM_DFLT => self::PARAM_LICENSE_FREE, + ApiBase::PARAM_DFLT => self::PARAM_LICENSE_ANY, ], 'continue' => [ ApiBase::PARAM_TYPE => 'integer', diff --git a/tests/phpunit/ApiQueryPageImagesTest.php b/tests/phpunit/ApiQueryPageImagesTest.php index 9eab2fb..1359279 100644 --- a/tests/phpunit/ApiQueryPageImagesTest.php +++ b/tests/phpunit/ApiQueryPageImagesTest.php @@ -105,7 +105,7 @@ $this->assertContainsOnly( 'array', $params ); $this->assertArrayHasKey( 'license', $params ); $this->assertEquals( $params['license'][\ApiBase::PARAM_TYPE], ['free', 'any'] ); - $this->assertEquals( $params['license'][\ApiBase::PARAM_DFLT], 'free' ); + $this->assertEquals( $params['license'][\ApiBase::PARAM_DFLT], 'any' ); $this->assertEquals( $params['license'][\ApiBase::PARAM_ISMULTI], false ); } -- To view, visit https://gerrit.wikimedia.org/r/324827 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1d35e965dc37c8c4ecdcc43313b3198e951e1978 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org> Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: MaxSem <maxsem.w...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits