https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113339

Revision: 113339
Author:   tstarling
Date:     2012-03-08 00:49:50 +0000 (Thu, 08 Mar 2012)
Log Message:
-----------
(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.

Modified Paths:
--------------
    trunk/phase3/RELEASE-NOTES-1.20
    trunk/phase3/includes/EditPage.php

Modified: trunk/phase3/RELEASE-NOTES-1.20
===================================================================
--- trunk/phase3/RELEASE-NOTES-1.20     2012-03-08 00:34:42 UTC (rev 113338)
+++ trunk/phase3/RELEASE-NOTES-1.20     2012-03-08 00:49:50 UTC (rev 113339)
@@ -40,6 +40,8 @@
 * (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.

Modified: trunk/phase3/includes/EditPage.php
===================================================================
--- trunk/phase3/includes/EditPage.php  2012-03-08 00:34:42 UTC (rev 113338)
+++ trunk/phase3/includes/EditPage.php  2012-03-08 00:49:50 UTC (rev 113339)
@@ -3043,9 +3043,7 @@
                $wgOut->addHTML( '</div>' );
 
                $wgOut->wrapWikiMsg( '<h2>$1</h2>', "yourdiff" );
-               $de = new DifferenceEngine( $this->mArticle->getContext() );
-               $de->setText( $this->getCurrentText(), $this->textbox2 );
-               $de->showDiff( wfMsg( "storedversion" ), wfMsgExt( 'yourtext', 
'parseinline' ) );
+               $this->showDiff();
 
                $wgOut->wrapWikiMsg( '<h2>$1</h2>', "yourtext" );
                $this->showTextbox2();


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to