Some documentation. Let's talk about it in wikitech-l.
[mediawiki.git] / includes / SpecialLongpages.php
blobd2ba4ffd3dbf4790f7b7676bc77a6dc2ffb7d9ac
1 <?php
2 /**
4 */
6 /**
8 */
9 require_once( "QueryPage.php" );
11 /**
14 class LongPagesPage extends QueryPage {
16 function getName() {
17 return "Longpages";
20 function isExpensive() {
21 return true;
24 function getSQL() {
25 $dbr =& wfGetDB( DB_SLAVE );
26 $cur = $dbr->tableName( 'cur' );
28 return
29 "SELECT 'Longpages' as type,
30 cur_namespace as namespace,
31 cur_title as title,
32 LENGTH(cur_text) AS value
33 FROM $cur
34 WHERE cur_namespace=0 AND cur_is_redirect=0";
37 function formatResult( $skin, $result ) {
38 global $wgLang;
39 $nb = wfMsg( "nbytes", $wgLang->formatNum( $result->value ) );
40 $link = $skin->makeKnownLink( $result->title, "" );
41 return "{$link} ({$nb})";
45 /**
46 * constructor
48 function wfSpecialLongpages()
50 list( $limit, $offset ) = wfCheckLimits();
52 $lpp = new LongPagesPage( );
54 $lpp->doQuery( $offset, $limit );