var $mTokenOk = true;
var $tooBig = false;
var $kblength = false;
+ var $missingComment = false;
# Form values
var $save = false, $preview = false, $diff = false;
wfProfileIn( "$fname-sectionanchor" );
$sectionanchor = '';
if( $this->section == 'new' ) {
+ if ( $this->textbox1 == '' ) {
+ $this->missingComment = true;
+ return true;
+ }
if( $this->summary != '' ) {
$sectionanchor = $this->sectionAnchor( $this->summary );
}
$s = wfMsg( 'editing', $this->mTitle->getPrefixedText() );
}
$wgOut->setPageTitle( $s );
+
+ if ( $this->missingComment ) {
+ $wgOut->addWikiText( wfMsg( 'missingcommenttext' ) );
+ }
+
if ( !$this->checkUnicodeCompliantBrowser() ) {
$wgOut->addWikiText( wfMsg( 'nonunicodebrowser') );
}
'showlivepreview' => 'Live preview',
'showdiff' => 'Show changes',
'anoneditwarning' => 'You are not logged in. Your IP address will be recorded in this page\'s edit history.',
+'missingcommenttext' => 'Please enter a comment below.',
'blockedtitle' => 'User is blocked',
'blockedtext' => 'Your user name or IP address has been blocked by $1.
The reason given is this:<br />\'\'$2\'\'<p>You may contact $1 or one of the other