Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1028,16 +1028,13 @@ |
1029 | 1029 | $this->isConflict = false; |
1030 | 1030 | wfDebug( __METHOD__ .": conflict suppressed; new section\n" ); |
1031 | 1031 | } |
| 1032 | + } elseif ( $this->section == '' && $this->userWasLastToEdit( $wgUser->getId(), $this->edittime ) ) { |
| 1033 | + # Suppress edit conflict with self, except for section edits where merging is required. |
| 1034 | + wfDebug( __METHOD__ . ": Suppressing edit conflict, same user.\n" ); |
| 1035 | + $this->isConflict = false; |
1032 | 1036 | } |
1033 | 1037 | } |
1034 | | - $userid = $wgUser->getId(); |
1035 | 1038 | |
1036 | | - # Suppress edit conflict with self, except for section edits where merging is required. |
1037 | | - if ( $this->isConflict && $this->section == '' && $this->userWasLastToEdit( $userid, $this->edittime ) ) { |
1038 | | - wfDebug( __METHOD__ . ": Suppressing edit conflict, same user.\n" ); |
1039 | | - $this->isConflict = false; |
1040 | | - } |
1041 | | - |
1042 | 1039 | if ( $this->isConflict ) { |
1043 | 1040 | wfDebug( __METHOD__ . ": conflict! getting section '$this->section' for time '$this->edittime' (article time '" . |
1044 | 1041 | $this->mArticle->getTimestamp() . "')\n" ); |
— | — | @@ -1068,8 +1065,6 @@ |
1069 | 1066 | return self::AS_CONFLICT_DETECTED; |
1070 | 1067 | } |
1071 | 1068 | |
1072 | | - $oldtext = $this->mArticle->getContent(); |
1073 | | - |
1074 | 1069 | // Run post-section-merge edit filter |
1075 | 1070 | if ( !wfRunHooks( 'EditFilterMerged', array( $this, $text, &$this->hookError, $this->summary ) ) ) { |
1076 | 1071 | # Error messages etc. could be handled within the hook... |
— | — | @@ -1082,7 +1077,8 @@ |
1083 | 1078 | } |
1084 | 1079 | |
1085 | 1080 | # Handle the user preference to force summaries here, but not for null edits |
1086 | | - if ( $this->section != 'new' && !$this->allowBlankSummary && 0 != strcmp( $oldtext, $text ) |
| 1081 | + if ( $this->section != 'new' && !$this->allowBlankSummary |
| 1082 | + && 0 != strcmp( $this->mArticle->getContent(), $text ) |
1087 | 1083 | && !Title::newFromRedirect( $text ) ) # check if it's not a redirect |
1088 | 1084 | { |
1089 | 1085 | if ( md5( $this->summary ) == $this->autoSumm ) { |