wrap removed
[lhc/web/wiklou.git] / includes / EditPage.php
index 607c735..5e6df2b 100644 (file)
@@ -52,7 +52,6 @@ class EditPage {
                        }
                        return;
                }
-               if( !$wgRequest->wasPosted() ) $this->save = false;
                if ( $this->save ) {
                        $this->editForm( "save" );
                } else if ( $this->preview ) {
@@ -73,8 +72,8 @@ class EditPage {
                $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' );
 
@@ -225,7 +224,9 @@ class EditPage {
                                        $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 );
@@ -312,7 +313,7 @@ class EditPage {
 
                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";
@@ -354,8 +355,8 @@ class EditPage {
 <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>