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
14 require_once 'QueryPage.php';
18 * @subpackage SpecialPage
20 class MostrevisionsPage
extends QueryPage
{
22 function getName() { return 'Mostrevisions'; }
23 function isExpensive() { return true; }
24 function isSyndicated() { return false; }
27 $dbr =& wfGetDB( DB_SLAVE
);
28 extract( $dbr->tableNames( 'revision', 'page' ) );
32 'Mostrevisions' as type,
33 page_namespace as namespace,
37 LEFT JOIN $page ON page_id = rev_page
38 WHERE page_namespace = " . NS_MAIN
. "
44 function formatResult( $skin, $result ) {
45 global $wgLang, $wgContLang;
47 $nt = Title
::makeTitle( $result->namespace, $result->title
);
48 $text = $wgContLang->convert( $nt->getPrefixedText() );
50 $plink = $skin->makeKnownLinkObj( $nt, $text );
52 $nl = wfMsgExt( 'nrevisions', array( 'parsemag', 'escape'),
53 $wgLang->formatNum( $result->value
) );
54 $nlink = $skin->makeKnownLinkObj( $nt, $nl, 'action=history' );
56 return wfSpecialList($plink, $nlink);
63 function wfSpecialMostrevisions() {
64 list( $limit, $offset ) = wfCheckLimits();
66 $wpp = new MostrevisionsPage();
68 $wpp->doQuery( $offset, $limit );