diff --git a/includes/MergeHistory.php b/includes/MergeHistory.php index 85f6b9c9496..c5d44ff6e0d 100644 --- a/includes/MergeHistory.php +++ b/includes/MergeHistory.php @@ -579,6 +579,8 @@ class MergeHistory { // fails, it will be communicated in the status reponse. $reason = wfMessage( 'mergehistory-source-deleted-reason' )->inContentLanguage()->plain(); $deletionStatus = $newPage->doDeleteArticleReal( $reason, $user ); + // Notify callers that the source page has been deleted. + $status->value = 'source-deleted'; $status->merge( $deletionStatus ); } diff --git a/includes/specials/SpecialMergeHistory.php b/includes/specials/SpecialMergeHistory.php index f81ad0d5e74..9008970cc6e 100644 --- a/includes/specials/SpecialMergeHistory.php +++ b/includes/specials/SpecialMergeHistory.php @@ -411,9 +411,8 @@ class SpecialMergeHistory extends SpecialPage { ); // In some cases the target page will be deleted - $append = $targetTitle->exists( Title::READ_LATEST ) - ? '' - : $this->msg( 'mergehistory-source-deleted', $targetLink ); + $append = ( $mergeStatus->getValue() === 'source-deleted' ) + ? $this->msg( 'mergehistory-source-deleted', $targetLink ) : ''; $this->getOutput()->addWikiMsg( $this->msg( 'mergehistory-done' ) ->rawParams( $targetLink )