Changing comments layout preparing for generated documentation with Phpdocumentor
[lhc/web/wiklou.git] / includes / SpecialLongpages.php
1 <?php
2 /**
3 *
4 */
5
6 /**
7 *
8 */
9 require_once( "QueryPage.php" );
10
11 /**
12 *
13 */
14 class LongPagesPage extends QueryPage {
15
16 function getName() {
17 return "Longpages";
18 }
19
20 function isExpensive() {
21 return true;
22 }
23
24 function getSQL() {
25 $dbr =& wfGetDB( DB_SLAVE );
26 $cur = $dbr->tableName( 'cur' );
27
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";
35 }
36
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})";
42 }
43 }
44
45 /**
46 * constructor
47 */
48 function wfSpecialLongpages()
49 {
50 list( $limit, $offset ) = wfCheckLimits();
51
52 $lpp = new LongPagesPage( );
53
54 $lpp->doQuery( $offset, $limit );
55 }
56
57 ?>