From b49d9f5ae354efae62024eefb47b26fe5ba5c00c Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 11 Apr 2008 16:40:24 +0000 Subject: [PATCH] Show edit comment as it will appear in history when using preview and section=new --- includes/EditPage.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 47405f1e55..6adc0ecfff 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1246,13 +1246,15 @@ class EditPage { # For a bit more sophisticated detection of blank summaries, hash the # automatic one and pass that in the hidden field wpAutoSummary. $summaryhiddens = ''; - if( $this->missingSummary ) $summaryhiddens .= wfHidden( 'wpIgnoreBlankSummary', true ); + if( $this->missingSummary ) $summaryhiddens .= Xml::hidden( 'wpIgnoreBlankSummary', true ); $autosumm = $this->autoSumm ? $this->autoSumm : md5( $this->summary ); - $summaryhiddens .= wfHidden( 'wpAutoSummary', $autosumm ); + $summaryhiddens .= Xml::hidden( 'wpAutoSummary', $autosumm ); if( $this->section == 'new' ) { $commentsubject="\n
\n{$summaryhiddens}
"; $editsummary = ''; - $subjectpreview = $summarytext && $this->preview ? "
".wfMsg('subject-preview').':'.$sk->commentBlock( $this->summary, $this->mTitle )."
\n" : ''; + global $wgParser; + $formattedSummary = wfMsgForContent( 'newsectionsummary', $wgParser->stripSectionName( $this->summary ) ); + $subjectpreview = $summarytext && $this->preview ? "
".wfMsg('subject-preview').':'.$sk->commentBlock( $formattedSummary, $this->mTitle, true )."
\n" : ''; $summarypreview = ''; } else { $commentsubject = ''; -- 2.20.1