Index: EditPage.php =================================================================== --- EditPage.php (revision 31229) +++ EditPage.php (working copy) @@ -1229,14 +1229,26 @@ # if this is a comment, show a subject line at the top, which is also the edit summary. # Otherwise, show a summary field at the bottom $summarytext = htmlspecialchars( $wgContLang->recodeForEdit( $this->summary ) ); # FIXME + + # If a blank edit summary was previously provided, and the appropriate + # user preference is active, pass a hidden tag as wpIgnoreBlankSummary. This will stop the + # user being bounced back more than once in the event that a summary + # is not required. + ##### + # 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 ); + $autosumm = $this->autoSumm ? $this->autoSumm : md5( $this->summary ); + $summaryhiddens .= wfHidden( 'wpAutoSummary', $autosumm ); if( $this->section == 'new' ) { - $commentsubject="\n
\n
"; + $commentsubject="\n
\n{$summaryhiddens}
"; $editsummary = ''; $subjectpreview = $summarytext && $this->preview ? "
".wfMsg('subject-preview').':'.$sk->commentBlock( $this->summary, $this->mTitle )."
\n" : ''; $summarypreview = ''; } else { $commentsubject = ''; - $editsummary="\n
\n
"; + $editsummary="\n
\n{$summaryhiddens}
"; $summarypreview = $summarytext && $this->preview ? "
".wfMsg('summary-preview').':'.$sk->commentBlock( $this->summary, $this->mTitle )."
\n" : ''; $subjectpreview = ''; } @@ -1336,18 +1348,6 @@
"); - $wgOut->addHtml( '
' ); - $wgOut->addWikiMsgArray( 'edittools', array(), array( 'content' ) ); - $wgOut->addHtml( '
' ); - - $wgOut->addHTML( $this->editFormTextAfterTools ); - - $wgOut->addHTML( " -
-{$formattedtemplates} -
-" ); - /** * To make it harder for someone to slip a user a page * which submits an edit form to the wiki without their @@ -1363,19 +1363,17 @@ $token = htmlspecialchars( $wgUser->editToken() ); $wgOut->addHTML( "\n\n" ); + $wgOut->addHtml( '
' ); + $wgOut->addWikiMsgArray( 'edittools', array(), array( 'content' ) ); + $wgOut->addHtml( '
' ); - # If a blank edit summary was previously provided, and the appropriate - # user preference is active, pass a hidden tag here. This will stop the - # user being bounced back more than once in the event that a summary - # is not required. - if( $this->missingSummary ) { - $wgOut->addHTML( "\n" ); - } + $wgOut->addHTML( $this->editFormTextAfterTools ); - # For a bit more sophisticated detection of blank summaries, hash the - # automatic one and pass that in a hidden field. - $autosumm = $this->autoSumm ? $this->autoSumm : md5( $this->summary ); - $wgOut->addHtml( wfHidden( 'wpAutoSummary', $autosumm ) ); + $wgOut->addHTML( " +
+{$formattedtemplates} +
+" ); if ( $this->isConflict ) { $wgOut->wrapWikiMsg( '==$1==', "yourdiff" );