9 require_once( "QueryPage.php" );
14 class PopularPagesPage
extends QueryPage
{
17 return "Popularpages";
20 function isExpensive() {
21 # cur_counter is not indexed
26 $dbr =& wfGetDB( DB_SLAVE
);
27 $cur = $dbr->tableName( 'cur' );
30 "SELECT 'Popularpages' as type,
31 cur_namespace as namespace,
35 WHERE cur_namespace=0 AND cur_is_redirect=0";
38 function formatResult( $skin, $result ) {
40 $link = $skin->makeKnownLink( $result->title
, "" );
41 $nv = wfMsg( "nviews", $wgLang->formatNum( $result->value
) );
42 return "{$link} ({$nv})";
49 function wfSpecialPopularpages() {
50 list( $limit, $offset ) = wfCheckLimits();
52 $ppp = new PopularPagesPage();
54 return $ppp->doQuery( $offset, $limit );