3 * A special page to show pages in the
6 * @subpackage SpecialPage
8 * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
9 * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
10 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
15 * @subpackage SpecialPage
17 class MostrevisionsPage
extends QueryPage
{
19 function getName() { return 'Mostrevisions'; }
20 function isExpensive() { return true; }
21 function isSyndicated() { return false; }
24 $dbr =& wfGetDB( DB_SLAVE
);
25 extract( $dbr->tableNames( 'revision', 'page' ) );
29 'Mostrevisions' as type,
30 page_namespace as namespace,
34 JOIN $page ON page_id = rev_page
35 WHERE page_namespace = " . NS_MAIN
. "
41 function formatResult( $skin, $result ) {
42 global $wgLang, $wgContLang;
44 $nt = Title
::makeTitle( $result->namespace, $result->title
);
45 $text = $wgContLang->convert( $nt->getPrefixedText() );
47 $plink = $skin->makeKnownLinkObj( $nt, $text );
49 $nl = wfMsgExt( 'nrevisions', array( 'parsemag', 'escape'),
50 $wgLang->formatNum( $result->value
) );
51 $nlink = $skin->makeKnownLinkObj( $nt, $nl, 'action=history' );
53 return wfSpecialList($plink, $nlink);
60 function wfSpecialMostrevisions() {
61 list( $limit, $offset ) = wfCheckLimits();
63 $wpp = new MostrevisionsPage();
65 $wpp->doQuery( $offset, $limit );