X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSpecialLongpages.php;h=af56c17cb3c2d405566a0fd8a585d04ed98c4c2c;hb=fcd1cdeb930e1779af77b3747b7c60338d4e81d7;hp=0ebcb7e3c95fec35d719c483334c1803f6a00a49;hpb=29d030f994d0800dfa8f6c25c582f74ac3371422;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SpecialLongpages.php b/includes/SpecialLongpages.php index 0ebcb7e3c9..af56c17cb3 100644 --- a/includes/SpecialLongpages.php +++ b/includes/SpecialLongpages.php @@ -1,51 +1,41 @@ -getValidSpecialPages(); - $log = new LogPage( $vsp["Longpages"] ); - $log->mUpdateRecentChanges = false; - - global $wgMiserMode; - if ( $wgMiserMode ) { - $log->showAsDisabledPage(); - return; +getSkin(); + function sortDescending() { + return true; + } +} - $top = wfShowingResults( $offset, $limit ); - $wgOut->addHTML( "

{$top}\n" ); +/** + * constructor + */ +function wfSpecialLongpages() +{ + list( $limit, $offset ) = wfCheckLimits(); - $sl = wfViewPrevNext( $offset, $limit, - $wgLang->specialPage( "Longpages" ) ); - $wgOut->addHTML( "
{$sl}\n" ); + $lpp = new LongPagesPage(); - $s = "

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

{$sl}\n" ); - - # Saving cache - if ( $offset > 0 OR $limit < 50 ) return ; #Not suitable - $log->replaceContent( $s ); + $lpp->doQuery( $offset, $limit ); } ?>