r51302 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51301‎ | r51302 | r51303 >
Date:19:32, 1 June 2009
Author:aaron
Status:ok
Tags:
Comment:
*Tweaked $maxLineCount for usability
*(bug 18690) Maintain from/to values on namespace change
Modified paths:
  • /trunk/phase3/includes/specials/SpecialAllpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialAllpages.php
@@ -14,7 +14,7 @@
1515 /**
1616 * Maximum number of pages to show on single index subpage.
1717 */
18 - protected $maxLineCount = 200;
 18+ protected $maxLineCount = 100;
1919
2020 /**
2121 * Maximum number of chars to show for an entry.
@@ -48,7 +48,8 @@
4949
5050 $namespaces = $wgContLang->getNamespaces();
5151
52 - $wgOut->setPagetitle( ( $namespace > 0 && in_array( $namespace, array_keys( $namespaces) ) ) ?
 52+ $wgOut->setPagetitle(
 53+ ( $namespace > 0 && in_array( $namespace, array_keys( $namespaces) ) ) ?
5354 wfMsg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) :
5455 wfMsg( 'allarticles' )
5556 );
@@ -189,7 +190,7 @@
190191 // Instead, display the first section directly.
191192 if( count( $lines ) <= 2 ) {
192193 if( !empty($lines) ) {
193 - $this->showChunk( $namespace, $lines[0], $lines[count($lines)-1] );
 194+ $this->showChunk( $namespace, $from, $to );
194195 } else {
195196 $wgOut->addHTML( $this->namespaceForm( $namespace, $from, $to ) );
196197 }
@@ -343,7 +344,9 @@
344345 'page_title',
345346 array( 'page_namespace' => $namespace, 'page_title < '.$dbr->addQuotes($from) ),
346347 __METHOD__,
347 - array( 'ORDER BY' => 'page_title DESC', 'LIMIT' => $this->maxPerPage, 'OFFSET' => ($this->maxPerPage - 1 ) )
 348+ array( 'ORDER BY' => 'page_title DESC',
 349+ 'LIMIT' => $this->maxPerPage, 'OFFSET' => ($this->maxPerPage - 1 )
 350+ )
348351 );
349352
350353 # Get first title of previous complete chunk

Status & tagging log