*/
/**
+ * implements Special:Mostcategories
* @addtogroup SpecialPage
*/
class MostcategoriesPage extends QueryPage {
function isSyndicated() { return false; }
function getSQL() {
- $dbr =& wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_SLAVE );
list( $categorylinks, $page) = $dbr->tableNamesN( 'categorylinks', 'page' );
return
"
function formatResult( $skin, $result ) {
global $wgLang;
$title = Title::makeTitleSafe( $result->namespace, $result->title );
+ if ( !$title instanceof Title ) { throw new MWException('Invalid title in database'); }
$count = wfMsgExt( 'ncategories', array( 'parsemag', 'escape' ), $wgLang->formatNum( $result->value ) );
$link = $skin->makeKnownLinkObj( $title, $title->getText() );
return wfSpecialList( $link, $count );
$wpp->doQuery( $offset, $limit );
}
-?>
+