mediawiki logo instead of the wikipedia one
[mediawiki.git] / includes / SpecialLongpages.php
blob403801d2b23bde5736584618d6b3a902bdce20ea
1 <?php
3 include_once( "QueryPage.php" );
5 class LongPagesPage extends QueryPage {
7 function getName() {
8 return "Longpages";
11 function isExpensive() {
12 return 1;
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 ) {
22 global $wgLang;
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 );