Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -678,6 +678,7 @@ |
679 | 679 | 'mergehistory-invalid-destination', |
680 | 680 | 'mergehistory-autocomment', |
681 | 681 | 'mergehistory-comment', |
| 682 | + 'mergehistory-same-destination', |
682 | 683 | ), |
683 | 684 | 'mergelog' => array( |
684 | 685 | 'mergelog', |
Index: trunk/phase3/includes/specials/SpecialMergeHistory.php |
— | — | @@ -96,9 +96,11 @@ |
97 | 97 | wfEscapeWikiText( $this->mDestObj->getPrefixedText() ) |
98 | 98 | ); |
99 | 99 | } |
| 100 | + |
| 101 | + if ( $this->mTargetObj->equals( $this->mDestObj ) ) { |
| 102 | + $errors[] = wfMsgExt( 'mergehistory-same-destination', array( 'parse' ) ); |
| 103 | + } |
100 | 104 | |
101 | | - // TODO: warn about target = dest? |
102 | | - |
103 | 105 | if ( count( $errors ) ) { |
104 | 106 | $this->showMergeForm(); |
105 | 107 | $wgOut->addHTML( implode( "\n", $errors ) ); |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1328,6 +1328,7 @@ |
1329 | 1329 | 'mergehistory-invalid-destination' => 'Destination page must be a valid title.', |
1330 | 1330 | 'mergehistory-autocomment' => 'Merged [[:$1]] into [[:$2]]', |
1331 | 1331 | 'mergehistory-comment' => 'Merged [[:$1]] into [[:$2]]: $3', |
| 1332 | +'mergehistory-same-destination' => 'Source and destination pages cannot be the same', |
1332 | 1333 | |
1333 | 1334 | # Merge log |
1334 | 1335 | 'mergelog' => 'Merge log', |