Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -546,11 +546,22 @@ |
547 | 547 | |
548 | 548 | $this->mArticle->clear(); # Force reload of dates, etc. |
549 | 549 | $this->mArticle->forUpdate( true ); # Lock the article |
550 | | - |
551 | | - if( ( $this->section != 'new' ) && |
552 | | - ($this->mArticle->getTimestamp() != $this->edittime ) ) |
553 | | - { |
| 550 | + |
| 551 | + if( $this->mArticle->getTimestamp() != $this->edittime ) { |
554 | 552 | $this->isConflict = true; |
| 553 | + if( $this->section = 'new' ) { |
| 554 | + if( $this->mArticle->getUserText() == $wgUser->getName() && |
| 555 | + $this->mArticle->getComment() == $this->summary ) { |
| 556 | + // Probably a duplicate submission of a new comment. |
| 557 | + // This can happen when squid resends a request after |
| 558 | + // a timeout but the first one actually went through. |
| 559 | + wfDebug( "EditPage::editForm duplicate new section submission; trigger edit conflict!\n" ); |
| 560 | + } else { |
| 561 | + // New comment; suppress conflict. |
| 562 | + $this->isConflict = false; |
| 563 | + wfDebug( "EditPage::editForm conflict suppressed; new section\n" ); |
| 564 | + } |
| 565 | + } |
555 | 566 | } |
556 | 567 | $userid = $wgUser->getID(); |
557 | 568 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -309,6 +309,7 @@ |
310 | 310 | * Use content-lang for sitenotice |
311 | 311 | * (bug 4233) Update LanguageJa.php |
312 | 312 | * Fix regression: old version missing from edit links in Nostalgia skin |
| 313 | +* (bug 1600) Trigger edit conflict on duplicate section=new submissions |
313 | 314 | |
314 | 315 | |
315 | 316 | === Caveats === |