Code Duplication    Length = 4-4 lines in 2 locations

includes/EditPage.php 2 locations

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