From: Andrew Garrett Date: Thu, 2 Nov 2006 13:33:38 +0000 (+0000) Subject: (bug 7788) Force section headers in new section links for users who have 'prompt... X-Git-Tag: 1.31.0-rc.0~55310 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=2b771ce81bd26ce80184430ce343a18a8f74ae74;p=lhc%2Fweb%2Fwiklou.git (bug 7788) Force section headers in new section links for users who have 'prompt for blank edit summaries' on. --- 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 = '';