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 ) {
47 $nt = Title
::makeTitle( $result->namespace, $result->title
);
48 $text = $wgContLang->convert( $nt->getPrefixedText() );
50 $plink = $skin->makeKnownLinkObj( $nt, $text );
52 $nl = wfMsg( 'nrevisions', $result->value
);
53 $nlink = $skin->makeKnownLinkObj( $nt, $nl, 'action=history' );
55 return "$plink ($nlink)";
62 function wfSpecialMostrevisions() {
63 list( $limit, $offset ) = wfCheckLimits();
65 $wpp = new MostrevisionsPage();
67 $wpp->doQuery( $offset, $limit );