From: Max Semenik Date: Fri, 4 Mar 2016 07:04:30 +0000 (-0800) Subject: Ditch support for original wikidiff X-Git-Tag: 1.31.0-rc.0~7729^2~2 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=356aea3ab66033587e2c476d5cf9dd71fc454896;p=lhc%2Fweb%2Fwiklou.git Ditch support for original wikidiff It's been unmaintained for a while and does not support various languages adequately. Also, document $wgExternalDiffEngine. Change-Id: Ia8aeffd79d550fb7a1a7121456940446eea8bd4f --- diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index b8ec76d657..437f8e660b 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -322,6 +322,8 @@ changes to languages because of Phabricator reports. * ContentHandler::supportsCategories method added. Default is true. CategoryMembershipChangeJob updates are skipped for content that does not support categories. +* wikidiff difference engine is no longer supported, anyone still using it are encouraged + to upgrade to wikidiff2 which is actively maintained and has better package availability. == Compatibility == diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index e7c8651cf7..27193fb98d 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -7744,7 +7744,11 @@ $wgUpdateRowsPerQuery = 100; */ /** - * Name of the external diff engine to use + * Name of the external diff engine to use. Supported values: + * * false: default PHP implementation, DairikiDiff + * * 'wikidiff2': Wikimedia's fast difference engine implemented as a PHP/HHVM module + * * 'wikidiff3': newer PHP-based difference engine + * * any other string is treated as a path to external diff executable */ $wgExternalDiffEngine = false; diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 99eefc0106..622137a73a 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -847,14 +847,9 @@ class DifferenceEngine extends ContextSource { $otext = str_replace( "\r\n", "\n", $otext ); $ntext = str_replace( "\r\n", "\n", $ntext ); - if ( $wgExternalDiffEngine == 'wikidiff' && function_exists( 'wikidiff_do_diff' ) ) { - # For historical reasons, external diff engine expects - # input text to be HTML-escaped already - $otext = htmlspecialchars( $wgContLang->segmentForDiff( $otext ) ); - $ntext = htmlspecialchars( $wgContLang->segmentForDiff( $ntext ) ); - - return $wgContLang->unsegmentForDiff( wikidiff_do_diff( $otext, $ntext, 2 ) ) . - $this->debug( 'wikidiff1' ); + if ( $wgExternalDiffEngine == 'wikidiff' ) { + wfDeprecated( 'wikidiff support', '1.27' ); + $wgExternalDiffEngine = false; } if ( $wgExternalDiffEngine == 'wikidiff2' && function_exists( 'wikidiff2_do_diff' ) ) {