} else {
$from = $par;
}
+ $wgOut->allowClickjacking();
$cap = new CategoryPager( $from );
+ $cap->doQuery();
$wgOut->addHTML(
XML::openElement( 'div', array('class' => 'mw-spcontent') ) .
- wfMsgExt( 'categoriespagetext', array( 'parse' ) ) .
+ wfMsgExt( 'categoriespagetext', array( 'parse' ), $cap->getNumRows() ) .
$cap->getStartForm( $from ) .
$cap->getNavigationBar() .
'<ul>' . $cap->getBody() . '</ul>' .
parent::__construct();
$from = str_replace( ' ', '_', $from );
if( $from !== '' ) {
- global $wgCapitalLinks, $wgContLang;
- if( $wgCapitalLinks ) {
- $from = $wgContLang->ucfirst( $from );
- }
+ $from = Title::capitalize( $from, NS_CATEGORY );
$this->mOffset = $from;
}
}
/* Override getBody to apply LinksBatch on resultset before actually outputting anything. */
public function getBody() {
- if (!$this->mQueryDone) {
- $this->doQuery();
- }
$batch = new LinkBatch;
$this->mResult->rewind();
function formatRow($result) {
global $wgLang;
$title = Title::makeTitle( NS_CATEGORY, $result->cat_title );
- $titleText = $this->getSkin()->makeLinkObj( $title, htmlspecialchars( $title->getText() ) );
+ $titleText = $this->getSkin()->link( $title, htmlspecialchars( $title->getText() ) );
$count = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ),
$wgLang->formatNum( $result->cat_pages ) );
return Xml::tags('li', null, "$titleText ($count)" ) . "\n";