From: Brad Jorsch Date: Fri, 26 Oct 2012 02:09:50 +0000 (-0400) Subject: (bug 41409) Fix regression in diffs while editing old revisions X-Git-Tag: 1.31.0-rc.0~21855^2 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=4c737011dc6eb0248b9fd813c3382a871cf3fcc8;p=lhc%2Fweb%2Fwiklou.git (bug 41409) Fix regression in diffs while editing old revisions Until the ContentHandler merge, when editing an old revision the "Show changes" button would show the diff between the current version and the text in the edit field. It appears that the ContentHandler merge somehow unfixed bug 34849. The same fix that was applied for that bug in r112819 translated into ContentHandler terms seems to fix the bug again here. Change-Id: I1eee25c530ef87ff2ecd61f0fd5c01de94eccb98 --- diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21 index 07cba04d40..d8314a3abd 100644 --- a/RELEASE-NOTES-1.21 +++ b/RELEASE-NOTES-1.21 @@ -51,6 +51,8 @@ production. * (bug 37020) sql.php with readline eats semicolon * (bug 11748) Properly handle optionally-closed HTML tags when Tidy is disabled, and don't wrap HTML-syntax definition lists in paragraphs. +* (bug 41409) Diffs while editing an old revision should again diff against the + current revision. === API changes in 1.21 === * prop=revisions can now report the contentmodel and contentformat, see docs/contenthandler.txt diff --git a/includes/EditPage.php b/includes/EditPage.php index 00eb76f4e7..64167d785a 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2651,7 +2651,7 @@ HTML $oldContent = null; } } else { - $oldContent = $this->getOriginalContent(); + $oldContent = $this->getCurrentContent(); } $textboxContent = $this->toEditContent( $this->textbox1 );