typo, looks like objectcache need rewrite cause postgresql doesnt have a FROM_UNIXTIM...
[mediawiki.git] / includes / SpecialPopularpages.php
blobe69743314cb3a88c632b28a750de3cdf64c9140a
1 <?php
3 require_once( "QueryPage.php" );
5 class PopularPagesPage extends QueryPage {
7 function getName() {
8 return "Popularpages";
11 function isExpensive() {
12 # cur_counter is not indexed
13 return true;
16 function getSQL() {
17 return
18 "SELECT 'Popularpages' as type,
19 cur_namespace as namespace,
20 cur_title as title,
21 cur_counter as value
22 FROM cur
23 WHERE cur_namespace=0 AND cur_is_redirect=0";
26 function formatResult( $skin, $result ) {
27 global $wgLang;
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 );