* (bug 5365) Stop users being prompted to enter an edit summary for null edits, if...
authorAndrew Garrett <werdna@users.mediawiki.org>
Tue, 7 Nov 2006 12:53:07 +0000 (12:53 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Tue, 7 Nov 2006 12:53:07 +0000 (12:53 +0000)
RELEASE-NOTES
includes/EditPage.php

index 27cb304..9c012c1 100644 (file)
@@ -149,7 +149,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 7819) Move automatic redirect edit summary after pre-save transform
   to work properly with subst: fun
 * (bug 7826) Fix typos in two English messages.
-
+* (bug 5365) Stop users being prompted to enter an edit summary for null edits,
+  if they have selected that option in preferences.
 
 == Languages updated ==
 
index 5a3e67c..3017005 100644 (file)
@@ -723,8 +723,11 @@ class EditPage {
                        return true;
                }
 
-               # Handle the user preference to force summaries here
-               if( $this->section != 'new' && !$this->allowBlankSummary && $wgUser->getOption( 'forceeditsummary' ) ) {
+               $oldtext = $this->mArticle->getContent();
+
+               # Handle the user preference to force summaries here, but not for null edits
+               if( $this->section != 'new' && !$this->allowBlankSummary && $wgUser->getOption( 'forceeditsummary')
+                       &&  0 != strcmp($oldtext, $text) ) {
                        if( md5( $this->summary ) == $this->autoSumm ) {
                                $this->missingSummary = true;
                                wfProfileOut( $fname );