3 require_once( "QueryPage.php" );
5 class PopularPagesPage
extends QueryPage
{
11 function isExpensive() {
12 # cur_counter is not indexed
18 "SELECT 'Popularpages' as type,
19 cur_namespace as namespace,
23 WHERE cur_namespace=0 AND cur_is_redirect=0";
26 function formatResult( $skin, $result ) {
28 $link = $skin->makeKnownLink( $result->title
, "" );
29 $nv = wfMsg( "nviews", $wgLang->formatNum( $result->value
) );
30 return "{$link} ({$nv})";
34 function wfSpecialPopularpages()
36 list( $limit, $offset ) = wfCheckLimits();
38 $ppp = new PopularPagesPage();
40 return $ppp->doQuery( $offset, $limit );