r33136 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r33135‎ | r33136 | r33137 >
Date:16:40, 11 April 2008
Author:ialex
Status:old
Tags:
Comment:
Show edit comment as it will appear in history when using preview and section=new
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -1246,13 +1246,15 @@
12471247 # For a bit more sophisticated detection of blank summaries, hash the
12481248 # automatic one and pass that in the hidden field wpAutoSummary.
12491249 $summaryhiddens = '';
1250 - if( $this->missingSummary ) $summaryhiddens .= wfHidden( 'wpIgnoreBlankSummary', true );
 1250+ if( $this->missingSummary ) $summaryhiddens .= Xml::hidden( 'wpIgnoreBlankSummary', true );
12511251 $autosumm = $this->autoSumm ? $this->autoSumm : md5( $this->summary );
1252 - $summaryhiddens .= wfHidden( 'wpAutoSummary', $autosumm );
 1252+ $summaryhiddens .= Xml::hidden( 'wpAutoSummary', $autosumm );
12531253 if( $this->section == 'new' ) {
12541254 $commentsubject="<span id='wpSummaryLabel'><label for='wpSummary'>{$subject}:</label></span>\n<div class='editOptions'>\n<input tabindex='1' type='text' value=\"$summarytext\" name='wpSummary' id='wpSummary' maxlength='200' size='60' />{$summaryhiddens}<br />";
12551255 $editsummary = '';
1256 - $subjectpreview = $summarytext && $this->preview ? "<div class=\"mw-summary-preview\">".wfMsg('subject-preview').':'.$sk->commentBlock( $this->summary, $this->mTitle )."</div>\n" : '';
 1256+ global $wgParser;
 1257+ $formattedSummary = wfMsgForContent( 'newsectionsummary', $wgParser->stripSectionName( $this->summary ) );
 1258+ $subjectpreview = $summarytext && $this->preview ? "<div class=\"mw-summary-preview\">".wfMsg('subject-preview').':'.$sk->commentBlock( $formattedSummary, $this->mTitle, true )."</div>\n" : '';
12571259 $summarypreview = '';
12581260 } else {
12591261 $commentsubject = '';

Status & tagging log