From: Tim Starling Date: Thu, 8 Mar 2012 00:49:50 +0000 (+0000) Subject: (bug 34929) Show the correct diff when a section edit is rejected by the spam filter... X-Git-Tag: 1.31.0-rc.0~24336 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=4565aac9f039dc7980445c8cdfbeeb373b2e5925;p=lhc%2Fweb%2Fwiklou.git (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. --- 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();