array ( 'categorylinks', 'page' ), 'fields' => array ( "'" . NS_CATEGORY . "' AS namespace", 'cl_to AS title', 'COUNT(*) AS value' ), 'conds' => array ( 'page_title IS NULL' ), 'options' => array ( 'GROUP BY' => 'cl_to' ), 'join_conds' => array ( 'page' => array ( 'LEFT JOIN', array ( 'page_title = cl_to', 'page_namespace' => NS_CATEGORY ) ) ) ); } /** * @param $skin Skin * @param $result * @return string */ function formatResult( $skin, $result ) { global $wgLang, $wgContLang; $nt = Title::makeTitle( $result->namespace, $result->title ); $text = htmlspecialchars( $wgContLang->convert( $nt->getText() ) ); $plink = $this->isCached() ? $skin->link( $nt, $text ) : $skin->link( $nt, $text, array(), array(), array( 'broken' ) ); $nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape'), $wgLang->formatNum( $result->value ) ); return wfSpecialList($plink, $nlinks); } }