Code Duplication    Length = 9-11 lines in 2 locations

includes/specials/SpecialUndelete.php 1 location

@@ 1052-1060 (lines=9) @@
1049
		}
1050
1051
		if ( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
1052
			if ( !$rev->userCan( Revision::DELETED_TEXT, $user ) ) {
1053
				$out->wrapWikiMsg(
1054
					"<div class='mw-warning plainlinks'>\n$1\n</div>\n",
1055
				$rev->isDeleted( Revision::DELETED_RESTRICTED ) ?
1056
					'rev-suppressed-text-permission' : 'rev-deleted-text-permission'
1057
				);
1058
1059
				return;
1060
			}
1061
1062
			$out->wrapWikiMsg(
1063
				"<div class='mw-warning plainlinks'>\n$1\n</div>\n",

includes/EditPage.php 1 location

@@ 2918-2928 (lines=11) @@
2915
				if ( $revision ) {
2916
					// Let sysop know that this will make private content public if saved
2917
2918
					if ( !$revision->userCan( Revision::DELETED_TEXT, $wgUser ) ) {
2919
						$wgOut->wrapWikiMsg(
2920
							"<div class='mw-warning plainlinks'>\n$1\n</div>\n",
2921
							'rev-deleted-text-permission'
2922
						);
2923
					} elseif ( $revision->isDeleted( Revision::DELETED_TEXT ) ) {
2924
						$wgOut->wrapWikiMsg(
2925
							"<div class='mw-warning plainlinks'>\n$1\n</div>\n",
2926
							'rev-deleted-text-view'
2927
						);
2928
					}
2929
2930
					if ( !$revision->isCurrent() ) {
2931
						$this->mArticle->setOldSubtitle( $revision->getId() );