From 533b78a5e10ff7430c5f0bf611fd38747a306653 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Fri, 3 Nov 2006 01:37:06 +0000 Subject: [PATCH] Add to my commit from last night - give a separate message for not providing a headline, rather than the standard one for not having an edit summary. This should fully resolve bug 7788 --- includes/EditPage.php | 7 ++++++- languages/messages/MessagesEn.php | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 0002179a88..96e8677368 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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 ); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index bc23e34963..fd12d79489 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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' => "'''Your user name or IP address has been blocked.''' -- 2.20.1