3 require_once( "QueryPage.php" );
5 class LongPagesPage
extends QueryPage
{
11 function isExpensive() {
15 function getSQL( $offset, $limit ) {
16 return "SELECT cur_title, LENGTH(cur_text) AS len FROM cur " .
17 "WHERE cur_namespace=0 AND cur_is_redirect=0 ORDER BY len DESC " .
18 "LIMIT {$offset}, {$limit}";
21 function formatResult( $skin, $result ) {
23 $nb = wfMsg( "nbytes", $wgLang->formatNum( $result->len
) );
24 $link = $skin->makeKnownLink( $result->cur_title
, "" );
25 return "{$link} ({$nb})";
29 function wfSpecialLongpages()
31 list( $limit, $offset ) = wfCheckLimits();
33 $lpp = new LongPagesPage( );
35 $lpp->doQuery( $offset, $limit );