X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FSpecialShortpages.php;h=4feb514e274fbf2b086778d93dba9160c0315682;hb=f597b18c42c488fea7921803358e1f0671190f13;hp=2cb6c378900a4a4f83eb1d04f294f044372ba6b6;hpb=0332f4c59809e5a89f626e8969cd76261819f432;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SpecialShortpages.php b/includes/SpecialShortpages.php index 2cb6c37890..4feb514e27 100644 --- a/includes/SpecialShortpages.php +++ b/includes/SpecialShortpages.php @@ -1,6 +1,10 @@ tableName( 'cur' ); + + return + "SELECT 'Shortpages' as type, + cur_namespace as namespace, + cur_title as title, + LENGTH(cur_text) AS value + FROM $cur + WHERE cur_namespace=0 AND cur_is_redirect=0"; + } + + function sortDescending() { + return false; } function formatResult( $skin, $result ) { - $nb = wfMsg( "nbytes", $result->len ); - $link = $skin->makeKnownLink( $result->cur_title, "" ); + global $wgLang; + $nb = wfMsg( "nbytes", $wgLang->formatNum( $result->value ) ); + $link = $skin->makeKnownLink( $result->title, "" ); return "{$link} ({$nb})"; } } -function wfSpecialShortpages() -{ +function wfSpecialShortpages() { list( $limit, $offset ) = wfCheckLimits(); $spp = new ShortPagesPage();