From: WMDE-Fisch Date: Wed, 22 Aug 2018 13:29:17 +0000 (+0200) Subject: Prepare DiffRenderer to changed parameters for wikidiff2 1.8.0 X-Git-Tag: 1.34.0-rc.0~4301^2 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=763129619c31d12f9178704545596a4781ba85bd;p=lhc%2Fweb%2Fwiklou.git Prepare DiffRenderer to changed parameters for wikidiff2 1.8.0 The config parameter handling in wikidiff2 will migrate completely to phpini values. Due to that we will remove the php config variable wgWikiDiff2MovedParagraphDetectionCutoff and its usage. In the process of deleting the 4th parameter in the wikidiff2_do_diff() method, this exception is added so deployment can be handled separately. On the long run these exceptions will be removed completely and the (then) current mediawiki will depend on wikdiff2 > 1.8.0 Bug: T194272 Depends-On: I673d2489d5bce1a24a6ea83e168704948564661b Change-Id: I30262412b0784b84af88ffab6ed0694a08b671e9 --- diff --git a/includes/diff/TextSlotDiffRenderer.php b/includes/diff/TextSlotDiffRenderer.php index baedcf05ee..9c60705587 100644 --- a/includes/diff/TextSlotDiffRenderer.php +++ b/includes/diff/TextSlotDiffRenderer.php @@ -209,7 +209,8 @@ class TextSlotDiffRenderer extends SlotDiffRenderer { $wikidiff2Version = phpversion( 'wikidiff2' ); if ( $wikidiff2Version !== false && - version_compare( $wikidiff2Version, '1.5.0', '>=' ) + version_compare( $wikidiff2Version, '1.5.0', '>=' ) && + version_compare( $wikidiff2Version, '1.8.0', '<' ) ) { $text = wikidiff2_do_diff( $oldText, @@ -218,7 +219,7 @@ class TextSlotDiffRenderer extends SlotDiffRenderer { $this->wikiDiff2MovedParagraphDetectionCutoff ); } else { - // Don't pass the 4th parameter for compatibility with older versions of wikidiff2 + // Don't pass the 4th parameter introduced in version 1.5.0 and removed in version 1.8.0 $text = wikidiff2_do_diff( $oldText, $newText,