3 # SpecialShortpages extends QueryPage. It is used to return the shortest
4 # pages in the database.
7 require_once("QueryPage.php");
9 class ShortPagesPage
extends QueryPage
{
15 function isExpensive() {
21 "SELECT 'Shortpages' as type,
22 cur_namespace as namespace,
24 LENGTH(cur_text) AS value
26 WHERE cur_namespace=0 AND cur_is_redirect=0";
29 function sortDescending() {
33 function formatResult( $skin, $result ) {
35 $nb = wfMsg( "nbytes", $wgLang->formatNum( $result->value
) );
36 $link = $skin->makeKnownLink( $result->title
, "" );
37 return "{$link} ({$nb})";
41 function wfSpecialShortpages() {
42 list( $limit, $offset ) = wfCheckLimits();
44 $spp = new ShortPagesPage();
46 return $spp->doQuery( $offset, $limit );