X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSpecialLongpages.php;h=a8a1e199beb6699d957ac807839170dabef77f6e;hb=42257dc68a6d95618f7d5ad29e1e741a59aab2e3;hp=e45e22c79a38a8396eb19fa159ae764b0e8d9a5d;hpb=0dbedf1c7b340a2e5db96e02c6e0e883ab1b6a12;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SpecialLongpages.php b/includes/SpecialLongpages.php index e45e22c79a..a8a1e199be 100644 --- a/includes/SpecialLongpages.php +++ b/includes/SpecialLongpages.php @@ -1,56 +1,33 @@ - - -function wfSpecialLongpages() -{ - global $wgUser, $wgOut, $wgLang, $wgTitle; - global $limit, $offset; # From query string - $fname = "wfSpecialLongpages"; - - # Cache - $vsp = $wgLang->getValidSpecialPages(); - $log = new LogPage( $vsp["Longpages"] ); - $log->mUpdateRecentChanges = false; - - global $wgMiserMode; - if ( $wgMiserMode ) { - $log->showAsDisabledPage(); - return; +getOption( "rclimit" ); - if ( ! $limit ) { $limit = 50; } + function sortDescending() { + return true; } - 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" );
+/**
+ * constructor
+ */
+function wfSpecialLongpages() {
+ list( $limit, $offset ) = wfCheckLimits();
- $sl = wfViewPrevNext( $offset, $limit,
- $wgLang->specialPage( "Longpages" ) );
- $wgOut->addHTML( "
{$sl}\n" );
+ $lpp = new LongPagesPage();
- $s = "
{$sl}\n" ); - - # Saving cache - if ( $offset > 0 OR $limit < 50 ) return ; #Not suitable - $log->replaceContent( $s ); + $lpp->doQuery( $offset, $limit ); } -?> +