Index: wp-includes/link-template.php
===================================================================
--- wp-includes/link-template.php	(revision 12936)
+++ wp-includes/link-template.php	(working copy)
@@ -1732,7 +1732,7 @@
 }
 
 /**
- * Retrieve the home url.
+ * Retrieve the home url for the current site.
  *
  * Returns the 'home' option with the appropriate protocol,  'https' if
  * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
@@ -1741,19 +1741,45 @@
  * @package WordPress
  * @since 3.0
  *
+ * @uses get_home_url()
  * @param  string $path   (optional) Path relative to the home url.
  * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http','https'
  * @return string Home url link with optional path appended.
 */
 function home_url( $path = '', $scheme = null ) {
+	return get_home_url(null, $path, $scheme);
+}
+
+/**
+ * Retrieve the home url for a given site.
+ *
+ * Returns the 'home' option with the appropriate protocol,  'https' if
+ * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
+ * overridden.
+ *
+ * @package WordPress
+ * @since 3.0
+ *
+ * @param  int $blog_id   (optional) Blog ID. Defaults to current blog.
+ * @param  string $path   (optional) Path relative to the home url.
+ * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http','https'
+ * @return string Home url link with optional path appended.
+*/
+function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
 	$orig_scheme = $scheme;
 	$scheme      = is_ssl() && !is_admin() ? 'https' : 'http';
-	$url = str_replace( 'http://', "$scheme://", get_option('home') );
 
+	if ( empty($blog_id) || !is_multisite() )
+		$home = get_option('home');
+	else
+		$home = get_blogaddress_by_id($blog_id);
+
+	$url = str_replace( 'http://', "$scheme://", $home );
+
 	if ( !empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false )
 		$url .= '/' . ltrim( $path, '/' );
 
-	return apply_filters( 'home_url', $url, $path, $orig_scheme );
+	return apply_filters( 'home_url', $url, $path, $orig_scheme, $blog_id );
 }
 
 /**
Index: wp-admin/ms-sites.php
===================================================================
--- wp-admin/ms-sites.php	(revision 12936)
+++ wp-admin/ms-sites.php	(working copy)
@@ -82,7 +82,7 @@
 		?>
 		<div class="wrap">
 		<?php screen_icon(); ?>
-		<h2><?php _e('Edit Site'); ?> - <a href='http://<?php echo $details->domain . $details->path; ?>'>http://<?php echo $details->domain . $details->path; ?></a></h2>
+		<h2><?php _e('Edit Site'); ?> - <a href='<?php echo get_home_url($id); ?>'><?php echo get_home_url($id); ?></a></h2>
 		<form method="post" action="ms-edit.php?action=updateblog">
 			<?php wp_nonce_field('editblog'); ?>
 			<input type="hidden" name="id" value="<?php echo esc_attr($id) ?>" />
