<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[12674] trunk: Add is_subdomain_install() to ms code - Fixes #11796</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12674">12674</a></dd>
<dt>Author</dt> <dd>wpmuguru</dd>
<dt>Date</dt> <dd>2010-01-08 21:25:01 +0000 (Fri, 08 Jan 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add is_subdomain_install() to ms code - Fixes <a href="http://trac.wordpress.org/ticket/11796">#11796</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesmsphp">trunk/wp-admin/includes/ms.php</a></li>
<li><a href="#trunkwpadminmseditphp">trunk/wp-admin/ms-edit.php</a></li>
<li><a href="#trunkwpadminmsoptionsphp">trunk/wp-admin/ms-options.php</a></li>
<li><a href="#trunkwpadminmssitesphp">trunk/wp-admin/ms-sites.php</a></li>
<li><a href="#trunkwpconfigsamplephp">trunk/wp-config-sample.php</a></li>
<li><a href="#trunkwpincludesmsfunctionsphp">trunk/wp-includes/ms-functions.php</a></li>
<li><a href="#trunkwpincludesmssettingsphp">trunk/wp-includes/ms-settings.php</a></li>
<li><a href="#trunkwpsignupphp">trunk/wp-signup.php</a></li>
</ul>
<h3>Property Changed</h3>
<ul>
<li><a href="#trunkwpconfigsamplephp">trunk/wp-config-sample.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesmsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/ms.php (12673 => 12674)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/ms.php        2010-01-08 20:49:55 UTC (rev 12673)
+++ trunk/wp-admin/includes/ms.php        2010-01-08 21:25:01 UTC (rev 12674)
</span><span class="lines">@@ -732,7 +732,7 @@
</span><span class="cx"> add_action( 'admin_notices', 'site_admin_notice' );
</span><span class="cx">
</span><span class="cx"> function avoid_blog_page_permalink_collision( $data, $postarr ) {
</span><del>-        if( constant( 'VHOST' ) == 'yes' )
</del><ins>+        if( is_subdomain_install() )
</ins><span class="cx">                 return $data;
</span><span class="cx">         if( $data[ 'post_type' ] != 'page' )
</span><span class="cx">                 return $data;
</span></span></pre></div>
<a id="trunkwpadminmseditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-edit.php (12673 => 12674)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-edit.php        2010-01-08 20:49:55 UTC (rev 12673)
+++ trunk/wp-admin/ms-edit.php        2010-01-08 21:25:01 UTC (rev 12674)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx">                         if ( false === $blog_details ) {
</span><span class="cx">                                 if ( is_numeric( $dashboard_blog ) )
</span><span class="cx">                                         wp_die( __( 'Dashboard blog_id must be a blog that already exists' ) );
</span><del>-                                if ( constant( 'VHOST' ) == 'yes' ) {
</del><ins>+                                if ( is_subdomain_install() ) {
</ins><span class="cx">                                         $domain = $dashboard_blog . '.' . $current_site->domain;
</span><span class="cx">                                         $path = $current_site->path;
</span><span class="cx">                                 } else {
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx">                 if( !is_email( $email ) )
</span><span class="cx">                         wp_die( __('Invalid email address') );
</span><span class="cx">
</span><del>-                if( constant( 'VHOST' ) == 'yes' ) {
</del><ins>+                if( is_subdomain_install() ) {
</ins><span class="cx">                         $newdomain = $domain.".".$current_site->domain;
</span><span class="cx">                         $path = $base;
</span><span class="cx">                 } else {
</span></span></pre></div>
<a id="trunkwpadminmsoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-options.php (12673 => 12674)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-options.php        2010-01-08 20:49:55 UTC (rev 12673)
+++ trunk/wp-admin/ms-options.php        2010-01-08 21:25:01 UTC (rev 12674)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">                                         <label><input name="registration" type="radio" id="registration3" value='user' <?php echo get_site_option('registration') == 'user' ? 'checked="checked"' : ''; ?> /> <?php _e('Only user account can be created.'); ?></label><br />
</span><span class="cx">                                         <label><input name="registration" type="radio" id="registration4" value='blog' <?php echo get_site_option('registration') == 'blog' ? 'checked="checked"' : ''; ?> /> <?php _e('Only logged in users can create new blogs.'); ?></label><br />
</span><span class="cx">                                         <p><?php _e('Disable or enable registration and who or what can be registered. (Default=all)'); ?></p>
</span><del>-                                        <?php if( constant( 'VHOST' ) == 'yes' ) {
</del><ins>+                                        <?php if( is_subdomain_install() ) {
</ins><span class="cx">                                                 echo "<p>" . __('If registration is disabled, please set "NOBLOGREDIRECT" in wp-config.php to a url you will redirect visitors to if they visit a non existant blog.') . "</p>";
</span><span class="cx">                                         } ?>
</span><span class="cx">                                 </td>
</span></span></pre></div>
<a id="trunkwpadminmssitesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-sites.php (12673 => 12674)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-sites.php        2010-01-08 20:49:55 UTC (rev 12673)
+++ trunk/wp-admin/ms-sites.php        2010-01-08 21:25:01 UTC (rev 12674)
</span><span class="lines">@@ -401,7 +401,7 @@
</span><span class="cx">
</span><span class="cx">                 <?php
</span><span class="cx">                 // define the columns to display, the syntax is 'internal name' => 'display name'
</span><del>-                $blogname_columns = ( constant( "VHOST" ) == 'yes' ) ? __('Domain') : __('Path');
</del><ins>+                $blogname_columns = ( is_subdomain_install() ) ? __('Domain') : __('Path');
</ins><span class="cx">                 $posts_columns = array(
</span><span class="cx">                         'id' => __('ID'),
</span><span class="cx">                         'blogname' => $blogname_columns,
</span><span class="lines">@@ -457,7 +457,7 @@
</span><span class="cx">                                         }
</span><span class="cx">                                         echo "<tr $bgcolour class='$class'>";
</span><span class="cx">
</span><del>-                                        $blogname = ( constant( "VHOST" ) == 'yes' ) ? str_replace('.'.$current_site->domain, '', $blog['domain']) : $blog['path'];
</del><ins>+                                        $blogname = ( is_subdomain_install() ) ? str_replace('.'.$current_site->domain, '', $blog['domain']) : $blog['path'];
</ins><span class="cx">                                         foreach( $posts_columns as $column_name=>$column_display_name ) {
</span><span class="cx">                                                 switch($column_name) {
</span><span class="cx">                                                         case 'id': ?>
</span><span class="lines">@@ -586,7 +586,7 @@
</span><span class="cx">                                         <tr class="form-field form-required">
</span><span class="cx">                                                 <th style="text-align:center;" scope='row'><?php _e('Blog Address') ?></th>
</span><span class="cx">                                                 <td>
</span><del>-                                                <?php if ( constant( "VHOST" ) == 'yes' ) { ?>
</del><ins>+                                                <?php if ( is_subdomain_install() ) { ?>
</ins><span class="cx">                                                         <input name="blog[domain]" type="text" title="<?php _e('Domain') ?>"/>.<?php echo $current_site->domain;?>
</span><span class="cx">                                                 <?php } else {
</span><span class="cx">                                                         echo $current_site->domain . $current_site->path ?><input name="blog[domain]" type="text" title="<?php _e('Domain') ?>"/>
</span></span></pre></div>
<a id="trunkwpconfigsamplephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-config-sample.php (12673 => 12674)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-config-sample.php        2010-01-08 20:49:55 UTC (rev 12673)
+++ trunk/wp-config-sample.php        2010-01-08 21:25:01 UTC (rev 12674)
</span><span class="lines">@@ -1,76 +1,76 @@
</span><del>-<?php
-/**
- * The base configurations of the WordPress.
- *
- * This file has the following configurations: MySQL settings, Table Prefix,
- * Secret Keys, WordPress Language, and ABSPATH. You can find more information by
- * visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
- * wp-config.php} Codex page. You can get the MySQL settings from your web host.
- *
- * This file is used by the wp-config.php creation script during the
- * installation. You don't have to use the web site, you can just copy this file
- * to "wp-config.php" and fill in the values.
- *
- * @package WordPress
- */
-
-// ** MySQL settings - You can get this info from your web host ** //
-/** The name of the database for WordPress */
-define('DB_NAME', 'putyourdbnamehere');
-
-/** MySQL database username */
-define('DB_USER', 'usernamehere');
-
-/** MySQL database password */
-define('DB_PASSWORD', 'yourpasswordhere');
-
-/** MySQL hostname */
-define('DB_HOST', 'localhost');
-
-/** Database Charset to use in creating database tables. */
-define('DB_CHARSET', 'utf8');
-
-/** The Database Collate type. Don't change this if in doubt. */
-define('DB_COLLATE', '');
-
-/**#@+
- * Authentication Unique Keys.
- *
- * Change these to different unique phrases!
- * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
- * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
- *
- * @since 2.6.0
- */
-define('AUTH_KEY', 'put your unique phrase here');
-define('SECURE_AUTH_KEY', 'put your unique phrase here');
-define('LOGGED_IN_KEY', 'put your unique phrase here');
-define('NONCE_KEY', 'put your unique phrase here');
-/**#@-*/
-
-/**
- * WordPress Database Table prefix.
- *
- * You can have multiple installations in one database if you give each a unique
- * prefix. Only numbers, letters, and underscores please!
- */
-$table_prefix = 'wp_';
-
-/**
- * WordPress Localized Language, defaults to English.
- *
- * Change this to localize WordPress. A corresponding MO file for the chosen
- * language must be installed to wp-content/languages. For example, install
- * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
- * language support.
- */
-define ('WPLANG', '');
-
-/* That's all, stop editing! Happy blogging. */
-
-/** Absolute path to the WordPress directory. */
-if ( !defined('ABSPATH') )
-        define('ABSPATH', dirname(__FILE__) . '/');
-
-/** Sets up WordPress vars and included files. */
-require_once(ABSPATH . 'wp-settings.php');
</del><ins>+<?php
+/**
+ * The base configurations of the WordPress.
+ *
+ * This file has the following configurations: MySQL settings, Table Prefix,
+ * Secret Keys, WordPress Language, and ABSPATH. You can find more information by
+ * visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
+ * wp-config.php} Codex page. You can get the MySQL settings from your web host.
+ *
+ * This file is used by the wp-config.php creation script during the
+ * installation. You don't have to use the web site, you can just copy this file
+ * to "wp-config.php" and fill in the values.
+ *
+ * @package WordPress
+ */
+
+// ** MySQL settings - You can get this info from your web host ** //
+/** The name of the database for WordPress */
+define('DB_NAME', 'putyourdbnamehere');
+
+/** MySQL database username */
+define('DB_USER', 'usernamehere');
+
+/** MySQL database password */
+define('DB_PASSWORD', 'yourpasswordhere');
+
+/** MySQL hostname */
+define('DB_HOST', 'localhost');
+
+/** Database Charset to use in creating database tables. */
+define('DB_CHARSET', 'utf8');
+
+/** The Database Collate type. Don't change this if in doubt. */
+define('DB_COLLATE', '');
+
+/**#@+
+ * Authentication Unique Keys.
+ *
+ * Change these to different unique phrases!
+ * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
+ * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
+ *
+ * @since 2.6.0
+ */
+define('AUTH_KEY', 'put your unique phrase here');
+define('SECURE_AUTH_KEY', 'put your unique phrase here');
+define('LOGGED_IN_KEY', 'put your unique phrase here');
+define('NONCE_KEY', 'put your unique phrase here');
+/**#@-*/
+
+/**
+ * WordPress Database Table prefix.
+ *
+ * You can have multiple installations in one database if you give each a unique
+ * prefix. Only numbers, letters, and underscores please!
+ */
+$table_prefix = 'wp_';
+
+/**
+ * WordPress Localized Language, defaults to English.
+ *
+ * Change this to localize WordPress. A corresponding MO file for the chosen
+ * language must be installed to wp-content/languages. For example, install
+ * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
+ * language support.
+ */
+define ('WPLANG', '');
+
+/* That's all, stop editing! Happy blogging. */
+
+/** Absolute path to the WordPress directory. */
+if ( !defined('ABSPATH') )
+        define('ABSPATH', dirname(__FILE__) . '/');
+
+/** Sets up WordPress vars and included files. */
+require_once(ABSPATH . 'wp-settings.php');
</ins><span class="cx">Property changes on: trunk/wp-config-sample.php
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:eol-style
</span><span class="cx"> - CRLF
</span><span class="cx"> + native
</span></span></pre></div>
<a id="trunkwpincludesmsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/ms-functions.php (12673 => 12674)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/ms-functions.php        2010-01-08 20:49:55 UTC (rev 12673)
+++ trunk/wp-includes/ms-functions.php        2010-01-08 21:25:01 UTC (rev 12674)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> function get_blogaddress_by_name( $blogname ) {
</span><span class="cx">         global $current_site;
</span><span class="cx">
</span><del>-        if( defined( "VHOST" ) && constant( "VHOST" ) == 'yes' ) {
</del><ins>+        if( is_subdomain_install() ) {
</ins><span class="cx">                 if( $blogname == 'main' )
</span><span class="cx">                         $blogname = 'www';
</span><span class="cx">                 return clean_url( "http://" . $blogname . "." . $current_site->domain . $current_site->path );
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function get_blogaddress_by_domain( $domain, $path ){
</span><del>-        if( defined( "VHOST" ) && constant( "VHOST" ) == 'yes' ) {
</del><ins>+        if( is_subdomain_install() ) {
</ins><span class="cx">                 $url = "http://".$domain.$path;
</span><span class="cx">         } else {
</span><span class="cx">                 if( $domain != $_SERVER['HTTP_HOST'] ) {
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx">         if ( $blog_id )
</span><span class="cx">                 return $blog_id;
</span><span class="cx">
</span><del>-        if ( defined('VHOST') && constant( 'VHOST' ) == 'yes' ) {
</del><ins>+        if ( is_subdomain_install() ) {
</ins><span class="cx">                 $domain = $name . '.' . $current_site->domain;
</span><span class="cx">                 $path = $current_site->path;
</span><span class="cx">         } else {
</span><span class="lines">@@ -1033,7 +1033,7 @@
</span><span class="cx">                 $errors->add('blogname', __("Sorry, blog names may not contain the character '_'!"));
</span><span class="cx">
</span><span class="cx">         // do not allow users to create a blog that conflicts with a page on the main blog.
</span><del>-        if ( constant( "VHOST" ) == 'no' && $wpdb->get_var( $wpdb->prepare( "SELECT post_name FROM " . $wpdb->get_blog_prefix( $current_site->blog_id ) . "posts WHERE post_type = 'page' AND post_name = %s", $blogname ) ) ) {
</del><ins>+        if ( !is_subdomain_install() && $wpdb->get_var( $wpdb->prepare( "SELECT post_name FROM " . $wpdb->get_blog_prefix( $current_site->blog_id ) . "posts WHERE post_type = 'page' AND post_name = %s", $blogname ) ) ) {
</ins><span class="cx">                 $errors->add( 'blogname', __( "Sorry, you may not use that blog name" ) );
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1051,7 +1051,7 @@
</span><span class="cx">          $errors->add('blog_title', __("Please enter a blog title"));
</span><span class="cx">
</span><span class="cx">         // Check if the domain/path has been used already.
</span><del>-        if( constant( "VHOST" ) == 'yes' ) {
</del><ins>+        if( is_subdomain_install() ) {
</ins><span class="cx">                 $mydomain = "$blogname.$domain";
</span><span class="cx">                 $path = $base;
</span><span class="cx">         } else {
</span><span class="lines">@@ -1138,7 +1138,7 @@
</span><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         // Send email with activation link.
</span><del>-        if( constant( "VHOST" ) == 'no' || $current_site->id != 1 ) {
</del><ins>+        if( !is_subdomain_install() || $current_site->id != 1 ) {
</ins><span class="cx">                 $activate_url = "http://" . $current_site->domain . $current_site->path . "wp-activate.php?key=$key";
</span><span class="cx">         } else {
</span><span class="cx">                 $activate_url = "http://{$domain}{$path}wp-activate.php?key=$key";
</span><span class="lines">@@ -1267,7 +1267,7 @@
</span><span class="cx">
</span><span class="cx"> function wpmu_create_blog($domain, $path, $title, $user_id, $meta = '', $site_id = 1) {
</span><span class="cx">         $domain = preg_replace( "/\s+/", '', sanitize_user( $domain, true ) );
</span><del>-        if( constant( 'VHOST' ) == 'yes' )
</del><ins>+        if( is_subdomain_install() )
</ins><span class="cx">                 $domain = str_replace( '@', '', $domain );
</span><span class="cx">         $title = strip_tags( $title );
</span><span class="cx">         $user_id = (int) $user_id;
</span></span></pre></div>
<a id="trunkwpincludesmssettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/ms-settings.php (12673 => 12674)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/ms-settings.php        2010-01-08 20:49:55 UTC (rev 12673)
+++ trunk/wp-includes/ms-settings.php        2010-01-08 21:25:01 UTC (rev 12674)
</span><span class="lines">@@ -1,4 +1,19 @@
</span><span class="cx"> <?php
</span><ins>+
+/**
+ * Whether a subdomain configuration is enabled
+ *
+ * @since 3.0
+ *
+ * @return bool True if subdomain configuration is enabled, false otherwise.
+ */
+function is_subdomain_install() {
+        if ( defined('VHOST') && VHOST == 'yes' )
+                return true;
+
+        return false;
+}
+
</ins><span class="cx"> if( isset( $current_site ) && isset( $current_blog ) )
</span><span class="cx">         return;
</span><span class="cx">
</span><span class="lines">@@ -65,7 +80,7 @@
</span><span class="cx">                 return $current_site;
</span><span class="cx">         }
</span><span class="cx">         $path = substr( $_SERVER[ 'REQUEST_URI' ], 0, 1 + strpos( $_SERVER[ 'REQUEST_URI' ], '/', 1 ) );
</span><del>-        if( constant( 'VHOST' ) == 'yes' ) {
</del><ins>+        if( is_subdomain_install() ) {
</ins><span class="cx">                 $current_site = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->site WHERE domain = %s AND path = %s", $domain, $path) );
</span><span class="cx">                 if( $current_site != null )
</span><span class="cx">                         return $current_site;
</span><span class="lines">@@ -113,7 +128,7 @@
</span><span class="cx"> if( !isset( $current_site->blog_id ) )
</span><span class="cx">         $current_site->blog_id = $wpdb->get_var( "SELECT blog_id FROM {$wpdb->blogs} WHERE domain='{$current_site->domain}' AND path='{$current_site->path}'" );
</span><span class="cx">
</span><del>-if( constant( 'VHOST' ) == 'yes' ) {
</del><ins>+if( is_subdomain_install() ) {
</ins><span class="cx">         $current_blog = wp_cache_get( 'current_blog_' . $domain, 'site-options' );
</span><span class="cx">         if( !$current_blog ) {
</span><span class="cx">                 $current_blog = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->blogs WHERE domain = %s", $domain) );
</span><span class="lines">@@ -143,7 +158,7 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-if( defined( "WP_INSTALLING" ) == false && constant( 'VHOST' ) == 'yes' && !is_object( $current_blog ) ) {
</del><ins>+if( defined( "WP_INSTALLING" ) == false && is_subdomain_install() && !is_object( $current_blog ) ) {
</ins><span class="cx">         if( defined( 'NOBLOGREDIRECT' ) ) {
</span><span class="cx">                 $destination = constant( 'NOBLOGREDIRECT' );
</span><span class="cx">                 if ( $destination == '%siteurl%' )
</span></span></pre></div>
<a id="trunkwpsignupphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-signup.php (12673 => 12674)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-signup.php        2010-01-08 20:49:55 UTC (rev 12673)
+++ trunk/wp-signup.php        2010-01-08 21:25:01 UTC (rev 12674)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> function show_blog_form($blogname = '', $blog_title = '', $errors = '') {
</span><span class="cx">         global $current_site;
</span><span class="cx">         // Blog name
</span><del>-        if( constant( "VHOST" ) == 'no' )
</del><ins>+        if( !is_subdomain_install() )
</ins><span class="cx">                 echo '<label for="blogname">' . __('Blog Name:') . '</label>';
</span><span class="cx">         else
</span><span class="cx">                 echo '<label for="blogname">' . __('Blog Domain:') . '</label>';
</span><span class="lines">@@ -65,14 +65,14 @@
</span><span class="cx">                 <p class="error"><?php echo $errmsg ?></p>
</span><span class="cx">         <?php }
</span><span class="cx">
</span><del>-        if( constant( "VHOST" ) == 'no' ) {
</del><ins>+        if( !is_subdomain_install() ) {
</ins><span class="cx">                 echo '<span class="prefix_address">' . $current_site->domain . $current_site->path . '</span><input name="blogname" type="text" id="blogname" value="'. esc_attr($blogname) .'" maxlength="50" /><br />';
</span><span class="cx">         } else {
</span><span class="cx">                 echo '<input name="blogname" type="text" id="blogname" value="'.esc_attr($blogname).'" maxlength="50" /><span class="suffix_address">.' . $current_site->domain . $current_site->path . '</span><br />';
</span><span class="cx">         }
</span><span class="cx">         if ( !is_user_logged_in() ) {
</span><span class="cx">                 print '(<strong>' . __( 'Your address will be ' );
</span><del>-                if( constant( "VHOST" ) == 'no' ) {
</del><ins>+                if( !is_subdomain_install() ) {
</ins><span class="cx">                         print $current_site->domain . $current_site->path . __( 'blogname' );
</span><span class="cx">                 } else {
</span><span class="cx">                         print __( 'domain.' ) . $current_site->domain . $current_site->path;
</span><span class="lines">@@ -420,7 +420,7 @@
</span><span class="cx">                                 _e( "You're logged in already. No need to register again!" );
</span><span class="cx">                         }
</span><span class="cx">                         if ($newblogname) {
</span><del>-                                if( constant( "VHOST" ) == 'no' )
</del><ins>+                                if( !is_subdomain_install() )
</ins><span class="cx">                                         $newblog = 'http://' . $current_site->domain . $current_site->path . $newblogname . '/';
</span><span class="cx">                                 else
</span><span class="cx">                                         $newblog = 'http://' . $newblogname . '.' . $current_site->domain . $current_site->path;
</span></span></pre>
</div>
</div>
</body>
</html>