Code Duplication    Length = 7-10 lines in 2 locations

includes/specials/SpecialUndelete.php 2 locations

@@ 631-637 (lines=7) @@
628
		} else {
629
			if ( $makepage ) {
630
				// Check the state of the newest to-be version...
631
				if ( !$unsuppress
632
					&& ( $latestRestorableRow->ar_deleted & Revision::DELETED_TEXT )
633
				) {
634
					$dbw->endAtomic( __METHOD__ );
635
636
					return Status::newFatal( "undeleterevdel" );
637
				}
638
				// Safe to insert now...
639
				$newid = $article->insertOn( $dbw, $latestRestorableRow->ar_page_id );
640
				if ( $newid === false ) {
@@ 647-656 (lines=10) @@
644
				$pageId = $newid;
645
			} else {
646
				// Check if a deleted revision will become the current revision...
647
				if ( $latestRestorableRow->ar_timestamp > $previousTimestamp ) {
648
					// Check the state of the newest to-be version...
649
					if ( !$unsuppress
650
						&& ( $latestRestorableRow->ar_deleted & Revision::DELETED_TEXT )
651
					) {
652
						$dbw->endAtomic( __METHOD__ );
653
654
						return Status::newFatal( "undeleterevdel" );
655
					}
656
				}
657
658
				$newid = false;
659
				$pageId = $article->getId();