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

@@ 2876-2886 (lines=11) @@
2873
				if ( $revision ) {
2874
					// Let sysop know that this will make private content public if saved
2875
2876
					if ( !$revision->userCan( Revision::DELETED_TEXT, $user ) ) {
2877
						$out->wrapWikiMsg(
2878
							"<div class='mw-warning plainlinks'>\n$1\n</div>\n",
2879
							'rev-deleted-text-permission'
2880
						);
2881
					} elseif ( $revision->isDeleted( Revision::DELETED_TEXT ) ) {
2882
						$out->wrapWikiMsg(
2883
							"<div class='mw-warning plainlinks'>\n$1\n</div>\n",
2884
							'rev-deleted-text-view'
2885
						);
2886
					}
2887
2888
					if ( !$revision->isCurrent() ) {
2889
						$this->mArticle->setOldSubtitle( $revision->getId() );