Forgot to commit the change to showhideminor. Also removing commented-out strings.
[lhc/web/wiklou.git] / includes / SpecialLongpages.php
1 <?php
2
3 require_once( "QueryPage.php" );
4
5 class LongPagesPage extends QueryPage {
6
7 function getName() {
8 return "Longpages";
9 }
10
11 function isExpensive() {
12 return true;
13 }
14
15 function getSQL() {
16 $dbr =& wfGetDB( DB_SLAVE );
17 $cur = $dbr->tableName( 'cur' );
18
19 return
20 "SELECT 'Longpages' as type,
21 cur_namespace as namespace,
22 cur_title as title,
23 LENGTH(cur_text) AS value
24 FROM $cur
25 WHERE cur_namespace=0 AND cur_is_redirect=0";
26 }
27
28 function formatResult( $skin, $result ) {
29 global $wgLang;
30 $nb = wfMsg( "nbytes", $wgLang->formatNum( $result->value ) );
31 $link = $skin->makeKnownLink( $result->title, "" );
32 return "{$link} ({$nb})";
33 }
34 }
35
36 function wfSpecialLongpages()
37 {
38 list( $limit, $offset ) = wfCheckLimits();
39
40 $lpp = new LongPagesPage( );
41
42 $lpp->doQuery( $offset, $limit );
43 }
44
45 ?>