X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fdiff%2FTextSlotDiffRenderer.php;h=510465bd962ccbdc64c09f7a46f8cab1f5d3bff8;hp=e2cdd82b8628c3f20de98db1d9fa0c7761755719;hb=04d1aa3033f40a38d721f7f0e88b5bac440d2869;hpb=b6a1f3bc774d043c69e9ed2875210049cdda9d68 diff --git a/includes/diff/TextSlotDiffRenderer.php b/includes/diff/TextSlotDiffRenderer.php index e2cdd82b86..510465bd96 100644 --- a/includes/diff/TextSlotDiffRenderer.php +++ b/includes/diff/TextSlotDiffRenderer.php @@ -51,14 +51,6 @@ class TextSlotDiffRenderer extends SlotDiffRenderer { /** @var Language|null The language this content is in. */ private $language; - /** - * Number of paragraph moves the algorithm should attempt to detect. - * Only used with the wikidiff2 engine. - * @var int - * @see $wgWikiDiff2MovedParagraphDetectionCutoff - */ - private $wikiDiff2MovedParagraphDetectionCutoff = 0; - /** @var string One of the ENGINE_* constants. */ private $engine = self::ENGINE_PHP; @@ -72,7 +64,7 @@ class TextSlotDiffRenderer extends SlotDiffRenderer { * @return string */ public static function diff( $oldText, $newText ) { - /** @var $slotDiffRenderer TextSlotDiffRenderer */ + /** @var TextSlotDiffRenderer $slotDiffRenderer */ $slotDiffRenderer = ContentHandler::getForModelID( CONTENT_MODEL_TEXT ) ->getSlotDiffRenderer( RequestContext::getMain() ); return $slotDiffRenderer->getTextDiff( $oldText, $newText ); @@ -86,15 +78,6 @@ class TextSlotDiffRenderer extends SlotDiffRenderer { $this->language = $language; } - /** - * @param int $cutoff - * @see $wgWikiDiff2MovedParagraphDetectionCutoff - */ - public function setWikiDiff2MovedParagraphDetectionCutoff( $cutoff ) { - Assert::parameterType( 'integer', $cutoff, '$cutoff' ); - $this->wikiDiff2MovedParagraphDetectionCutoff = $cutoff; - } - /** * Set which diff engine to use. * @param string $type One of the ENGINE_* constants. @@ -205,7 +188,7 @@ class TextSlotDiffRenderer extends SlotDiffRenderer { $oldText, $newText, 2, - $this->wikiDiff2MovedParagraphDetectionCutoff + 0 ); } else { // Don't pass the 4th parameter introduced in version 1.5.0 and removed in version 1.8.0 @@ -214,12 +197,6 @@ class TextSlotDiffRenderer extends SlotDiffRenderer { $newText, 2 ); - - // Log a warning in case the configuration value is set to not silently ignore it - if ( $this->wikiDiff2MovedParagraphDetectionCutoff > 0 ) { - wfLogWarning( '$wgWikiDiff2MovedParagraphDetectionCutoff is set but has no - effect since the used version of WikiDiff2 does not support it.' ); - } } return $text;