From 4c737011dc6eb0248b9fd813c3382a871cf3fcc8 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Thu, 25 Oct 2012 22:09:50 -0400 Subject: [PATCH] (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 --- RELEASE-NOTES-1.21 | 2 ++ includes/EditPage.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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 ); -- 2.20.1