From 82b80fc483f1546b54de045c50778311e42337bd Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 21 Aug 2009 22:01:16 +0000 Subject: [PATCH] Revert r53710 "* Allow suppressing "line 1" from the diffs, which can get quite annoying with many diffs" Use of static variable here means that running multiple diffs during one request may mess things up. It should rather check if it's been added in $wgOut already. --- includes/diff/DifferenceEngine.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 2bb3759b8e..50391a117b 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -30,10 +30,6 @@ class DifferenceEngine { var $mCacheHit = false; // Was the diff fetched from cache? var $htmldiff; - // If true, line X is not displayed when X is 1, for example to increase - // readability and conserve space with many small diffs. - protected $mReducedLineNumbers = false; - protected $unhide = false; /**#@-*/ @@ -84,10 +80,6 @@ class DifferenceEngine { $this->unhide = $unhide; } - function setReducedLineNumbers( $value = true ) { - $this->mReducedLineNumbers = $value; - } - function getTitle() { return $this->mTitle; } @@ -645,16 +637,10 @@ CONTROL; */ function showDiffStyle() { global $wgStylePath, $wgStyleVersion, $wgOut; - - static $styleDone = false; - if ( $styleDone === $wgOut ) return; - $wgOut->addStyle( 'common/diff.css' ); // JS is needed to detect old versions of Mozilla to work around an annoyance bug. $wgOut->addScript( "" ); - - $styleDone = $wgOut; } /** @@ -856,7 +842,6 @@ CONTROL; function localiseLineNumbersCb( $matches ) { global $wgLang; - if ( $matches[1] === '1' && $this->mReducedLineNumbers ) return ''; return wfMsgExt( 'lineno', 'escape', $wgLang->formatNum( $matches[1] ) ); } -- 2.20.1