wfEscapeWikiText( $this->mDestObj->getPrefixedText() )
);
}
-
- // TODO: warn about target = dest?
+
+ if ( $this->mTargetObj->equals( $this->mDestObj ) ) {
+ $errors[] = wfMsgExt( 'mergehistory-same-destination', array( 'parse' ) );
+ }
if ( count( $errors ) ) {
$this->showMergeForm();
'mergehistory-invalid-destination' => 'Destination page must be a valid title.',
'mergehistory-autocomment' => 'Merged [[:$1]] into [[:$2]]',
'mergehistory-comment' => 'Merged [[:$1]] into [[:$2]]: $3',
+'mergehistory-same-destination' => 'Source and destination pages cannot be the same',
# Merge log
'mergelog' => 'Merge log',
'mergehistory-invalid-destination',
'mergehistory-autocomment',
'mergehistory-comment',
+ 'mergehistory-same-destination',
),
'mergelog' => array(
'mergelog',