Code Duplication    Length = 4-4 lines in 2 locations

includes/EditPage.php 2 locations

@@ 1370-1373 (lines=4) @@
1367
1368
		$title = Title::newFromText( $preload );
1369
		# Check for existence to avoid getting MediaWiki:Noarticletext
1370
		if ( $title === null || !$title->exists() || !$title->userCan( 'read', $wgUser ) ) {
1371
			// TODO: somehow show a warning to the user!
1372
			return $handler->makeEmptyContent();
1373
		}
1374
1375
		$page = WikiPage::factory( $title );
1376
		if ( $page->isRedirect() ) {
@@ 1379-1382 (lines=4) @@
1376
		if ( $page->isRedirect() ) {
1377
			$title = $page->getRedirectTarget();
1378
			# Same as before
1379
			if ( $title === null || !$title->exists() || !$title->userCan( 'read', $wgUser ) ) {
1380
				// TODO: somehow show a warning to the user!
1381
				return $handler->makeEmptyContent();
1382
			}
1383
			$page = WikiPage::factory( $title );
1384
		}
1385