mOffset = $from; } function getIndexField() { return 'tl_title'; } function getQueryInfo() { $query = array( 'tables' => array('templatelinks' ), 'fields' => array('tl_title'), 'conds' => array( 'tl_title like "Infobox_%"'), 'options' => array( 'DISTINCT' ), ); return $query; } function formatRow( $row ) { $title = Title::makeTitle( NS_TEMPLATE, $row->tl_title ); $titleText = $this->getSkin()->makeLinkObj( $title, htmlspecialchars( $title->getText() ) ); $type = substr( $title->getText(), 8 ); return Xml::tags('li', null, "$titleText ($type)" ) . "\n"; } function getBody() { if (!$this->mQueryDone) { $this->doQuery(); } $batch = new LinkBatch; $this->mResult->rewind(); while ( $row = $this->mResult->fetchObject() ) { $batch->addObj( Title::makeTitleSafe( NS_TEMPLATE, $row->tl_title ) ); } $batch->execute(); $this->mResult->rewind(); return parent::getBody(); } /** * Preserve group and username offset parameters when paging * @return array */ function getDefaultQuery() { parent::getDefaultQuery(); unset( $this->mDefaultQuery['from'] ); } } ?>