From: Tim Starling Date: Fri, 9 Apr 2004 15:24:22 +0000 (+0000) Subject: Some browsers allow submission of the form without setting wpSave. Restoring the... X-Git-Tag: 1.3.0beta1~515 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=83b144cb42beaa3f5ba82e7d18f73c22dc1f27c8;p=lhc%2Fweb%2Fwiklou.git Some browsers allow submission of the form without setting wpSave. Restoring the previous behaviour (treat as save) --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 6fe2392493..4293b84821 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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' );