MediaWiki
REL1_19
|
00001 <?php 00002 00010 abstract class ImageQueryPage extends QueryPage { 00011 00023 protected function outputResults( $out, $skin, $dbr, $res, $num, $offset ) { 00024 if( $num > 0 ) { 00025 $gallery = new ImageGallery(); 00026 00027 # $res might contain the whole 1,000 rows, so we read up to 00028 # $num [should update this to use a Pager] 00029 for( $i = 0; $i < $num && $row = $dbr->fetchObject( $res ); $i++ ) { 00030 $namespace = isset( $row->namespace ) ? $row->namespace : NS_FILE; 00031 $title = Title::makeTitleSafe( $namespace, $row->title ); 00032 if ( $title instanceof Title && $title->getNamespace() == NS_FILE ) { 00033 $gallery->add( $title, $this->getCellHtml( $row ) ); 00034 } 00035 } 00036 00037 $out->addHTML( $gallery->toHtml() ); 00038 } 00039 } 00040 00041 // Gotta override this since it's abstract 00042 function formatResult( $skin, $result ) { } 00043 00050 protected function getCellHtml( $row ) { 00051 return ''; 00052 } 00053 00054 }