Improve hidden field checks for bug 1181
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 13 Oct 2008 15:40:02 +0000 (15:40 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 13 Oct 2008 15:40:02 +0000 (15:40 +0000)
includes/EditPage.php

index bf43177..ff9d79a 100644 (file)
@@ -574,7 +574,7 @@ class EditPage {
 
                        $this->scrolltop = $request->getIntOrNull( 'wpScrolltop' );
 
-                       if ( is_null( $this->edittime ) ) {
+                       if ( is_null($this->section) || !$this->edittime || !$this->starttime ) {
                                # If the form is incomplete, force to preview.
                                wfDebug( "$fname: Form data appears to be incomplete\n" );
                                wfDebug( "POST DATA: " . var_export( $_POST, true ) . "\n" );