}
return;
}
- if( !$wgRequest->wasPosted() ) $this->save = false;
if ( $this->save ) {
$this->editForm( "save" );
} else if ( $this->preview ) {
$this->edittime = $request->getVal( 'wpEdittime' );
if( !preg_match( '/^\d{14}$/', $this->edittime ) ) $this->edittime = "";
- $this->save = $request->getCheck( 'wpSave' );
$this->preview = $request->getCheck( 'wpPreview' );
+ $this->save = $request->wasPosted() && !$this->preview;
$this->minoredit = $request->getCheck( 'wpMinoredit' );
$this->watchthis = $request->getCheck( 'wpWatchthis' );
$sectitle=preg_match("/^=+(.*?)=+/mi",
$this->textbox1,
$matches);
- if($matches[1]) { $this->summary = "/* ". trim($matches[1])." */ "; }
+ if( !empty( $matches[1] ) ) {
+ $this->summary = "/* ". trim($matches[1])." */ ";
+ }
}
}
$wgOut->setPageTitle( $s );
if ( "preview" == $formtype) {
$previewhead="<h2>" . wfMsg( "preview" ) . "</h2>\n<p><large><center><font color=\"#cc0000\">" .
- wfMsg( "note" ) . wfMsg( "previewnote" ) . "</font></center></large><p>\n";
+ wfMsg( "note" ) . wfMsg( "previewnote" ) . "</font></center></large></p>\n";
if ( $isConflict ) {
$previewhead.="<h2>" . wfMsg( "previewconflict" ) .
"</h2>\n";
<form id=\"editform\" name=\"editform\" method=\"post\" action=\"$action\"
enctype=\"application/x-www-form-urlencoded\">
{$commentsubject}
-<textarea tabindex='2' name=\"wpTextbox1\" rows='{$rows}'
-cols='{$cols}'{$ew} wrap=\"virtual\">" .
+<textarea tabindex='1' accesskey=\",\" name=\"wpTextbox1\" rows='{$rows}'
+cols='{$cols}'{$ew}>" .
htmlspecialchars( $wgLang->recodeForEdit( $this->textbox1 ) ) .
"
</textarea>