From 4565aac9f039dc7980445c8cdfbeeb373b2e5925 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Thu, 8 Mar 2012 00:49:50 +0000 Subject: [PATCH] (bug 34929) Show the correct diff when a section edit is rejected by the spam filter. Use EditPage::showDiff() so that the same kind of diff is shown as when you click the "show changes" button. I considered changing the source text to be the original section text, but if you do that, the line numbers are wrong and section=new doesn't show you the headline which may have matched the spam filter. --- RELEASE-NOTES-1.20 | 2 ++ includes/EditPage.php | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20 index 41cf78fe7b..ea774819dd 100644 --- a/RELEASE-NOTES-1.20 +++ b/RELEASE-NOTES-1.20 @@ -40,6 +40,8 @@ production. * (bug 34863) Show deletion log extract on non-existent file pages if applicable. * (bug 28019) Let ?preloadtitle=foo be passed on to target of Special:MyPage and Special:MyTalk +* (bug 34929) Show the correct diff when a section edit is rejected by the spam + filter === API changes in 1.20 === * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API. diff --git a/includes/EditPage.php b/includes/EditPage.php index 3c1dba68af..287ed97c1f 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -3043,9 +3043,7 @@ HTML $wgOut->addHTML( '' ); $wgOut->wrapWikiMsg( '

$1

', "yourdiff" ); - $de = new DifferenceEngine( $this->mArticle->getContext() ); - $de->setText( $this->getCurrentText(), $this->textbox2 ); - $de->showDiff( wfMsg( "storedversion" ), wfMsgExt( 'yourtext', 'parseinline' ) ); + $this->showDiff(); $wgOut->wrapWikiMsg( '

$1

', "yourtext" ); $this->showTextbox2(); -- 2.20.1