Add to my commit from last night - give a separate message for not providing a headli...
authorAndrew Garrett <werdna@users.mediawiki.org>
Fri, 3 Nov 2006 01:37:06 +0000 (01:37 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Fri, 3 Nov 2006 01:37:06 +0000 (01:37 +0000)
includes/EditPage.php
languages/messages/MessagesEn.php

index 0002179..96e8677 100644 (file)
@@ -748,6 +748,7 @@ class EditPage {
                        }
                }
 
+               #And a similar thing for new sections
                 if( $this->section == 'new' && !$this->allowBlankSummary && $wgUser->getOption( 'forceeditsummary' ) ) {
                        if (trim($this->summary) == '') {
                                $this->missingSummary = true;
@@ -874,9 +875,13 @@ class EditPage {
                                $wgOut->addWikiText( wfMsg( 'missingcommenttext' ) );
                        }
                        
-                       if( $this->missingSummary ) {
+                       if( $this->missingSummary && $this->section != 'new' ) {
                                $wgOut->addWikiText( wfMsg( 'missingsummary' ) );
                        }
+
+                        if( $this->missingSummary && $this->section == 'new' ) {
+                                $wgOut->addWikiText( wfMsg( 'missingcommentheader' ) );
+                        }
                        
                        if( !$this->hookError == '' ) {
                                $wgOut->addWikiText( $this->hookError );
index bc23e34..fd12d79 100644 (file)
@@ -887,6 +887,7 @@ format. Please enter a well-formatted address or empty that field.',
 'anoneditwarning' => "'''Warning:''' You are not logged in. Your IP address will be recorded in this page's edit history.",
 'missingsummary' => "'''Reminder:''' You have not provided an edit summary. If you click Save again, your edit will be saved without one.",
 'missingcommenttext' => 'Please enter a comment below.',
+'missingcommentheader' => "'''Reminder:''' You have not provided a subject/headline for this comment. If you click Save again, your edit will be saved without one.",
 'blockedtitle' => 'User is blocked',
 'blockedtext' => "<big>'''Your user name or IP address has been blocked.'''</big>