diff options
Diffstat (limited to 'includes/ImageQueryPage.php')
-rw-r--r-- | includes/ImageQueryPage.php | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/includes/ImageQueryPage.php b/includes/ImageQueryPage.php index f9f6ceed..75f7ba64 100644 --- a/includes/ImageQueryPage.php +++ b/includes/ImageQueryPage.php @@ -29,25 +29,25 @@ * @author Rob Church <robchur@gmail.com> */ 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 ''; } - } |