r55545 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55544‎ | r55545 | r55546 >
Date:05:37, 24 August 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
Recommit r53710 without the hack for preventing style sheets being added multiple times (is not possible with OutputPage::addStyle in the first place)
Modified paths:
  • /trunk/phase3/includes/diff/DifferenceEngine.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/diff/DifferenceEngine.php
@@ -30,6 +30,10 @@
3131 var $mCacheHit = false; // Was the diff fetched from cache?
3232 var $htmldiff;
3333
 34+ // If true, line X is not displayed when X is 1, for example to increase
 35+ // readability and conserve space with many small diffs.
 36+ protected $mReducedLineNumbers = false;
 37+
3438 protected $unhide = false;
3539 /**#@-*/
3640
@@ -80,6 +84,10 @@
8185 $this->unhide = $unhide;
8286 }
8387
 88+ function setReducedLineNumbers( $value = true ) {
 89+ $this->mReducedLineNumbers = $value;
 90+ }
 91+
8492 function getTitle() {
8593 return $this->mTitle;
8694 }
@@ -842,6 +850,7 @@
843851
844852 function localiseLineNumbersCb( $matches ) {
845853 global $wgLang;
 854+ if ( $matches[1] === '1' && $this->mReducedLineNumbers ) return '';
846855 return wfMsgExt( 'lineno', 'escape', $wgLang->formatNum( $matches[1] ) );
847856 }
848857

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r53710* Don't add 200 extra css/js requests when showing 100 diffs...nikerabbit11:06, 24 July 2009

Status & tagging log