Code Duplication    Length = 4-4 lines in 2 locations

includes/EditPage.php 2 locations

@@ 1297-1300 (lines=4) @@
1294
1295
		$title = Title::newFromText( $preload );
1296
		# Check for existence to avoid getting MediaWiki:Noarticletext
1297
		if ( $title === null || !$title->exists() || !$title->userCan( 'read', $wgUser ) ) {
1298
			// TODO: somehow show a warning to the user!
1299
			return $handler->makeEmptyContent();
1300
		}
1301
1302
		$page = WikiPage::factory( $title );
1303
		if ( $page->isRedirect() ) {
@@ 1306-1309 (lines=4) @@
1303
		if ( $page->isRedirect() ) {
1304
			$title = $page->getRedirectTarget();
1305
			# Same as before
1306
			if ( $title === null || !$title->exists() || !$title->userCan( 'read', $wgUser ) ) {
1307
				// TODO: somehow show a warning to the user!
1308
				return $handler->makeEmptyContent();
1309
			}
1310
			$page = WikiPage::factory( $title );
1311
		}
1312