(bug 7788) Force section headers in new section links for users who have 'prompt...
authorAndrew Garrett <werdna@users.mediawiki.org>
Thu, 2 Nov 2006 13:33:38 +0000 (13:33 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Thu, 2 Nov 2006 13:33:38 +0000 (13:33 +0000)
RELEASE-NOTES
includes/EditPage.php

index c23e4f4..2b182b4 100644 (file)
@@ -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 ==
 
index 6bbeaac..0002179 100644 (file)
@@ -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 = '';