3 require_once( "QueryPage.php" );
5 class PopularPagesPage
extends QueryPage
{
11 function isExpensive() {
12 # cur_counter is not indexed
17 $dbr =& wfGetDB( DB_SLAVE
);
18 $cur = $dbr->tableName( 'cur' );
21 "SELECT 'Popularpages' as type,
22 cur_namespace as namespace,
26 WHERE cur_namespace=0 AND cur_is_redirect=0";
29 function formatResult( $skin, $result ) {
31 $link = $skin->makeKnownLink( $result->title
, "" );
32 $nv = wfMsg( "nviews", $wgLang->formatNum( $result->value
) );
33 return "{$link} ({$nv})";
37 function wfSpecialPopularpages()
39 list( $limit, $offset ) = wfCheckLimits();
41 $ppp = new PopularPagesPage();
43 return $ppp->doQuery( $offset, $limit );