From: Aaron Schulz Date: Mon, 1 Jun 2009 19:32:11 +0000 (+0000) Subject: *Tweaked $maxLineCount for usability X-Git-Tag: 1.31.0-rc.0~41556 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=5203569fe53a42fc6fd4d087352652ab5e9de21a;p=lhc%2Fweb%2Fwiklou.git *Tweaked $maxLineCount for usability *(bug 18690) Maintain from/to values on namespace change --- 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