Code Duplication    Length = 7-7 lines in 2 locations

wp-admin/network/site-new.php 1 location

@@ 87-93 (lines=7) @@
84
		wp_die( __( 'Invalid email address.' ) );
85
	}
86
87
	if ( is_subdomain_install() ) {
88
		$newdomain = $domain . '.' . preg_replace( '|^www\.|', '', $current_site->domain );
89
		$path      = $current_site->path;
90
	} else {
91
		$newdomain = $current_site->domain;
92
		$path      = $current_site->path . $domain . '/';
93
	}
94
95
	$password = 'N/A';
96
	$user_id = email_exists($email);

wp-includes/ms-blogs.php 1 location

@@ 94-100 (lines=7) @@
91
	if ( $blog_id )
92
		return $blog_id;
93
94
	if ( is_subdomain_install() ) {
95
		$domain = $slug . '.' . $current_site->domain;
96
		$path = $current_site->path;
97
	} else {
98
		$domain = $current_site->domain;
99
		$path = $current_site->path . $slug . '/';
100
	}
101
102
	$blog_id = $wpdb->get_var( $wpdb->prepare("SELECT blog_id FROM {$wpdb->blogs} WHERE domain = %s AND path = %s", $domain, $path) );
103
	wp_cache_set( 'get_id_from_blogname_' . $slug, $blog_id, 'blog-details' );