X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FImageQueryPage.php;h=75f7ba640b5002d74397d34c03723e1d9ad31a18;hb=d1e3c987c996add061a3ca54eb432269b8e32774;hp=f9f6ceed4be18d5888cfb82bd7b3dc112e2c583e;hpb=b47a2148c68b7bc58b12ec77fa3fe159f834e4e7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ImageQueryPage.php b/includes/ImageQueryPage.php index f9f6ceed4b..75f7ba640b 100644 --- a/includes/ImageQueryPage.php +++ b/includes/ImageQueryPage.php @@ -29,25 +29,25 @@ * @author Rob Church */ abstract class ImageQueryPage extends QueryPage { - /** * Format and output report results using the given information plus * OutputPage * - * @param $out OutputPage to print to - * @param $skin Skin: user skin to use [unused] - * @param $dbr DatabaseBase (read) connection to use - * @param $res Integer: result pointer - * @param $num Integer: number of available result rows - * @param $offset Integer: paging offset + * @param OutputPage $out OutputPage to print to + * @param Skin $skin User skin to use [unused] + * @param DatabaseBase $dbr (read) connection to use + * @param int $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 = new ImageGallery(); + if ( $num > 0 ) { + $gallery = ImageGalleryBase::factory(); + $gallery->setContext( $this->getContext() ); # $res might contain the whole 1,000 rows, so we read up to # $num [should update this to use a Pager] - for( $i = 0; $i < $num && $row = $dbr->fetchObject( $res ); $i++ ) { + for ( $i = 0; $i < $num && $row = $dbr->fetchObject( $res ); $i++ ) { $namespace = isset( $row->namespace ) ? $row->namespace : NS_FILE; $title = Title::makeTitleSafe( $namespace, $row->title ); if ( $title instanceof Title && $title->getNamespace() == NS_FILE ) { @@ -65,11 +65,10 @@ abstract class ImageQueryPage extends QueryPage { /** * Get additional HTML to be shown in a results' cell * - * @param $row Object: result row - * @return String + * @param object $row Result row + * @return string */ protected function getCellHtml( $row ) { return ''; } - }