jenkins-bot has submitted this change and it was merged. Change subject: Return any image, not just the non-free image ......................................................................
Return any image, not just the non-free image The mobileview API directly accesses the page image, bypassing the PageImages API. I1d35e965dc37c8c4ecdcc43313b3198e951e1978 fixes the issue for the PageImages API. This patch fixes the issue for the mobileview API. Change-Id: If6cbb82f01fa298945c615a2f25e972a9d767d58 --- M includes/PageImages.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/PageImages.php b/includes/PageImages.php index 96b7a9f..be36510 100644 --- a/includes/PageImages.php +++ b/includes/PageImages.php @@ -39,16 +39,16 @@ */ public static function getPageImage( Title $title ) { $dbr = wfGetDB( DB_SLAVE ); - $name = $dbr->selectField( 'page_props', + $name = $dbr->selectFieldValues( 'page_props', 'pp_value', - [ 'pp_page' => $title->getArticleID(), 'pp_propname' => self::PROP_NAME ], + [ 'pp_page' => $title->getArticleID(), 'pp_propname' => [ self::PROP_NAME, self::PROP_NAME_FREE ] ], __METHOD__ ); $file = false; if ( $name ) { - $file = wfFindFile( $name ); + $file = wfFindFile( $name[0] ); } return $file; -- To view, visit https://gerrit.wikimedia.org/r/325075 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If6cbb82f01fa298945c615a2f25e972a9d767d58 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: Bmansurov <bmansu...@wikimedia.org> Gerrit-Reviewer: Catrope <r...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits