r42037 - Code Review

From MediaWiki.org

Jump to: navigation, search
Repository:MediaWiki
Revision:r42036 | r42037 (on ViewVC) | r42038 >
Date:15:40, 13 October 2008
Author:aaron
Status:resolved (Comments)
Tags:revertme 
Comment:Improve hidden field checks for bug 1181
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
===================================================================
--- trunk/phase3/includes/EditPage.php	(revision 42036)
+++ trunk/phase3/includes/EditPage.php	(revision 42037)
@@ -574,7 +574,7 @@
 
 			$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" );

Follow-up revisions

RevisionCommit summaryAuthorDate
r42569Revert r42037 "Improve hidden field checks for bug 1181"brion20:09, 25 October 2008

Comments

#Comment by Brion VIBBER (Talk | contribs)   18:58, 13 October 2008

Section, edittime, and starttime all appear before the textarea these days, so there shouldn't be much need for this particular check. Doesn't hurt, I suppose, but I'm not convinced it's going to help anything.

#Comment by Brion VIBBER (Talk | contribs)   20:06, 25 October 2008

This is causing trouble with bot edit tools, and since it doesn't have any benefit I can see anyway I'm going to back it out for now.

#Comment by Siebrand (Talk | contribs)   09:27, 27 October 2008

Reverted in r42569

Views
Toolbox