From 2b771ce81bd26ce80184430ce343a18a8f74ae74 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Thu, 2 Nov 2006 13:33:38 +0000 Subject: [PATCH] (bug 7788) Force section headers in new section links for users who have 'prompt for blank edit summaries' on. --- RELEASE-NOTES | 3 ++- includes/EditPage.php | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c23e4f4f99..2b182b4d26 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -123,7 +123,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Add whitespace above "templates included on this page" using CSS, not hardcoded line break. * Remove entries from redirect table on article deletion - +* (bug 7788) Force section headers in new section links for users who have + 'prompt for blank edit summaries' on. == Languages updated == diff --git a/includes/EditPage.php b/includes/EditPage.php index 6bbeaac9b9..0002179a88 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -748,6 +748,14 @@ class EditPage { } } + if( $this->section == 'new' && !$this->allowBlankSummary && $wgUser->getOption( 'forceeditsummary' ) ) { + if (trim($this->summary) == '') { + $this->missingSummary = true; + wfProfileOut( $fname ); + return( true ); + } + } + # All's well wfProfileIn( "$fname-sectionanchor" ); $sectionanchor = ''; -- 2.20.1