From: Alexandre Emsenhuber Date: Fri, 11 Apr 2008 16:40:24 +0000 (+0000) Subject: Show edit comment as it will appear in history when using preview and section=new X-Git-Tag: 1.31.0-rc.0~48442 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=b49d9f5ae354efae62024eefb47b26fe5ba5c00c;p=lhc%2Fweb%2Fwiklou.git Show edit comment as it will appear in history when using preview and section=new --- 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 = '';