array ( 'revision', 'page' ), 'fields' => array ( 'page_namespace AS namespace', 'page_title AS title', 'COUNT(*) AS value', 'page_is_redirect AS redirect' ), 'conds' => array ( 'page_namespace' => MWNamespace::getContentNamespaces(), 'page_id = rev_page' ), 'options' => array ( 'HAVING' => 'COUNT(*) > 1', // ^^^ This was probably here to weed out redirects. // Since we mark them as such now, it might be // useful to remove this. People _do_ create pages // and never revise them, they aren't necessarily // redirects. 'GROUP BY' => 'page_namespace, page_title, page_is_redirect' ) ); } function sortDescending() { return false; } /** * @param $skin Skin object * @param $result Object: database row */ function formatResult( $skin, $result ) { global $wgLang, $wgContLang; $nt = Title::makeTitleSafe( $result->namespace, $result->title ); if( !$nt ) { return ''; } $text = $wgContLang->convert( $nt->getPrefixedText() ); $plink = $skin->linkKnown( $nt, $text ); $nl = wfMsgExt( 'nrevisions', array( 'parsemag', 'escape' ), $wgLang->formatNum( $result->value ) ); $redirect = $result->redirect ? ' - ' . wfMsgHtml( 'isredirect' ) : ''; $nlink = $skin->linkKnown( $nt, $nl, array(), array( 'action' => 'history' ) ) . $redirect; return wfSpecialList( $plink, $nlink ); } }