Code Duplication    Length = 4-4 lines in 2 locations

includes/EditPage.php 2 locations

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