From b33cc4bb0902d405997ea3250fed905616c22f12 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Tue, 7 Nov 2006 12:53:07 +0000 Subject: [PATCH] * (bug 5365) Stop users being prompted to enter an edit summary for null edits, if they have selected that option in preferences. --- RELEASE-NOTES | 3 ++- includes/EditPage.php | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 27cb30446f..9c012c1525 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/EditPage.php b/includes/EditPage.php index 5a3e67c20a..3017005830 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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 ); -- 2.20.1