From 5203569fe53a42fc6fd4d087352652ab5e9de21a Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 1 Jun 2009 19:32:11 +0000 Subject: [PATCH] *Tweaked $maxLineCount for usability *(bug 18690) Maintain from/to values on namespace change --- includes/specials/SpecialAllpages.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialAllpages.php b/includes/specials/SpecialAllpages.php index b229e932ef..0a78f3df6e 100644 --- a/includes/specials/SpecialAllpages.php +++ b/includes/specials/SpecialAllpages.php @@ -14,7 +14,7 @@ class SpecialAllpages extends IncludableSpecialPage { /** * Maximum number of pages to show on single index subpage. */ - protected $maxLineCount = 200; + protected $maxLineCount = 100; /** * Maximum number of chars to show for an entry. @@ -48,7 +48,8 @@ class SpecialAllpages extends IncludableSpecialPage { $namespaces = $wgContLang->getNamespaces(); - $wgOut->setPagetitle( ( $namespace > 0 && in_array( $namespace, array_keys( $namespaces) ) ) ? + $wgOut->setPagetitle( + ( $namespace > 0 && in_array( $namespace, array_keys( $namespaces) ) ) ? wfMsg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) : wfMsg( 'allarticles' ) ); @@ -189,7 +190,7 @@ class SpecialAllpages extends IncludableSpecialPage { // Instead, display the first section directly. if( count( $lines ) <= 2 ) { if( !empty($lines) ) { - $this->showChunk( $namespace, $lines[0], $lines[count($lines)-1] ); + $this->showChunk( $namespace, $from, $to ); } else { $wgOut->addHTML( $this->namespaceForm( $namespace, $from, $to ) ); } @@ -343,7 +344,9 @@ class SpecialAllpages extends IncludableSpecialPage { 'page_title', array( 'page_namespace' => $namespace, 'page_title < '.$dbr->addQuotes($from) ), __METHOD__, - array( 'ORDER BY' => 'page_title DESC', 'LIMIT' => $this->maxPerPage, 'OFFSET' => ($this->maxPerPage - 1 ) ) + array( 'ORDER BY' => 'page_title DESC', + 'LIMIT' => $this->maxPerPage, 'OFFSET' => ($this->maxPerPage - 1 ) + ) ); # Get first title of previous complete chunk -- 2.20.1