addWikiText( wfMsg( "perfdisabled" ) ); return; } if ( ! $limit ) { $limit = $wgUser->getOption( "rclimit" ); if ( ! $limit ) { $limit = 50; } } if ( ! $offset ) { $offset = 0; } $sql = "SELECT cur_title, LENGTH(cur_text) AS len FROM cur " . "WHERE cur_namespace=0 AND cur_is_redirect=0 ORDER BY " . "LENGTH(cur_text) DESC LIMIT {$offset}, {$limit}"; $res = wfQuery( $sql, $fname ); $sk = $wgUser->getSkin(); $top = wfShowingResults( $offset, $limit ); $wgOut->addHTML( "

{$top}\n" ); $sl = wfViewPrevNext( $offset, $limit, $wgLang->specialPage( "Longpages" ) ); $wgOut->addHTML( "
{$sl}\n" ); $s = "

    "; while ( $obj = wfFetchObject( $res ) ) { $nb = str_replace( "$1", $obj->len, wfMsg( "nbytes" ) ); $link = $sk->makeKnownLink( $obj->cur_title, "" ); $s .= "
  1. {$link} ({$nb})
  2. \n"; } wfFreeResult( $res ); $s .= "
"; $wgOut->addHTML( $s ); $wgOut->addHTML( "

{$sl}\n" ); } ?>