Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1871
1600.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 8:14 PM
2014-11-21 20:14:43 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
1600.diff
View Options
Index: includes/EditPage.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/EditPage.php,v
retrieving revision 1.240
diff -u -r1.240 EditPage.php
--- includes/EditPage.php 5 Dec 2005 05:37:10 -0000 1.240
+++ includes/EditPage.php 11 Dec 2005 11:54:36 -0000
@@ -546,11 +546,22 @@
$this->mArticle->clear(); # Force reload of dates, etc.
$this->mArticle->forUpdate( true ); # Lock the article
-
- if( ( $this->section != 'new' ) &&
- ($this->mArticle->getTimestamp() != $this->edittime ) )
- {
+
+ if( $this->mArticle->getTimestamp() != $this->edittime ) {
$this->isConflict = true;
+ if( $this->section = 'new' ) {
+ if( $this->mArticle->getUserText() == $wgUser->getName() &&
+ $this->mArticle->getComment() == $this->summary ) {
+ // Probably a duplicate submission of a new comment.
+ // This can happen when squid resends a request after
+ // a timeout but the first one actually went through.
+ wfDebug( "EditPage::editForm duplicate new section submission; trigger edit conflict!\n" );
+ } else {
+ // New comment; suppress conflict.
+ $this->isConflict = false;
+ wfDebug( "EditPage::editForm conflict suppressed; new section\n" );
+ }
+ }
}
$userid = $wgUser->getID();
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1523
Default Alt Text
1600.diff (1 KB)
Attached To
Mode
T3600: Remove section markup inside heading text when using "section=new"
Attached
Detach File
Event Timeline
Log In to Comment