From: Gergő Tisza Date: Fri, 21 Sep 2018 05:39:55 +0000 (-0700) Subject: Support multi-content diffs on Special:Undelete X-Git-Tag: 1.34.0-rc.0~3562^2 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27user%27%2C%20userid=session.user.id%29%20%7D%7D?a=commitdiff_plain;h=05817c7361336b24466f60b2460a99595ce60e59;p=lhc%2Fweb%2Fwiklou.git Support multi-content diffs on Special:Undelete Bug: T201848 BUg: T202920 Change-Id: Ia9eedb457c1db6badfd4f81d0bc8516c4f5ccbf2 --- diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index a92982040b..f8703cd227 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -545,15 +545,9 @@ class SpecialUndelete extends SpecialPage { $diffContext->setWikiPage( WikiPage::factory( $currentRev->getTitle() ) ); $diffEngine = $currentRev->getContentHandler()->createDifferenceEngine( $diffContext ); + $diffEngine->setRevisions( $previousRev->getRevisionRecord(), $currentRev->getRevisionRecord() ); $diffEngine->showDiffStyle(); - - $formattedDiff = $diffEngine->generateContentDiffBody( - $previousRev->getContent( Revision::FOR_THIS_USER, $this->getUser() ), - $currentRev->getContent( Revision::FOR_THIS_USER, $this->getUser() ) - ); - - $formattedDiff = $diffEngine->addHeader( - $formattedDiff, + $formattedDiff = $diffEngine->getDiff( $this->diffHeader( $previousRev, 'o' ), $this->diffHeader( $currentRev, 'n' ) );