X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecialpage%2FImageQueryPage.php;h=59abefd83e9f6a84ac19fc9431436ce4948e1109;hb=f22ed7a94758561ace10ef9506425134b293cb13;hp=3ff281f952fd28e71a63a2600f6fbfa357beea93;hpb=222727927abfe04a3116e4f7671e7628b14fe661;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specialpage/ImageQueryPage.php b/includes/specialpage/ImageQueryPage.php index 3ff281f952..59abefd83e 100644 --- a/includes/specialpage/ImageQueryPage.php +++ b/includes/specialpage/ImageQueryPage.php @@ -21,6 +21,9 @@ * @ingroup SpecialPage */ +use Wikimedia\Rdbms\ResultWrapper; +use Wikimedia\Rdbms\IDatabase; + /** * Variant of QueryPage which uses a gallery to output results, thus * suited for reports generating images @@ -35,15 +38,14 @@ abstract class ImageQueryPage extends QueryPage { * * @param OutputPage $out OutputPage to print to * @param Skin $skin User skin to use [unused] - * @param DatabaseBase $dbr (read) connection to use + * @param IDatabase $dbr (read) connection to use * @param ResultWrapper $res Result pointer * @param int $num Number of available result rows * @param int $offset Paging offset */ protected function outputResults( $out, $skin, $dbr, $res, $num, $offset ) { if ( $num > 0 ) { - $gallery = ImageGalleryBase::factory(); - $gallery->setContext( $this->getContext() ); + $gallery = ImageGalleryBase::factory( false, $this->getContext() ); # $res might contain the whole 1,000 rows, so we read up to # $num [should update this to use a Pager] @@ -60,7 +62,7 @@ abstract class ImageQueryPage extends QueryPage { } } - $out->addHTML( $gallery->toHtml() ); + $out->addHTML( $gallery->toHTML() ); } }