From: Brion Vibber Date: Fri, 21 Aug 2009 22:01:16 +0000 (+0000) Subject: Revert r53710 "* Allow suppressing "line 1" from the diffs, which can get quite annoy... X-Git-Tag: 1.31.0-rc.0~40142 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27static%27%2C%20filename=%27css/bootstrap.css%27%29%20%7D%7D?a=commitdiff_plain;h=82b80fc483f1546b54de045c50778311e42337bd;p=lhc%2Fweb%2Fwiklou.git 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. --- 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] ) ); }