<!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>[BuddyPress] [3117] branches/1.2: Fixes #2489 props wpmuguru</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>3117</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2010-07-04 06:07:51 +0000 (Sun, 04 Jul 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fixes #2489 props wpmuguru</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branches12bpblogsbpblogstemplatetagsphp">branches/1.2/bp-blogs/bp-blogs-templatetags.php</a></li>
<li><a href="#branches12bpcorebpcorecatchuriphp">branches/1.2/bp-core/bp-core-catchuri.php</a></li>
<li><a href="#branches12bpcorebpcorewpabstractionphp">branches/1.2/bp-core/bp-core-wpabstraction.php</a></li>
<li><a href="#branches12bpthemesbpdefaultregistrationregisterphp">branches/1.2/bp-themes/bp-default/registration/register.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branches12bpblogsbpblogstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-blogs/bp-blogs-templatetags.php (3116 => 3117)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-blogs/bp-blogs-templatetags.php        2010-07-04 04:50:13 UTC (rev 3116)
+++ branches/1.2/bp-blogs/bp-blogs-templatetags.php        2010-07-04 06:07:51 UTC (rev 3117)
</span><span class="lines">@@ -361,7 +361,7 @@
</span><span class="cx">         global $current_site;
</span><span class="cx"> 
</span><span class="cx">         // Blog name
</span><del>-        if( 'no' == constant( &quot;VHOST&quot; ) )
</del><ins>+        if( !is_subdomain_install() )
</ins><span class="cx">                 echo '&lt;label for=&quot;blogname&quot;&gt;' . __('Blog Name:', 'buddypress') . '&lt;/label&gt;';
</span><span class="cx">         else
</span><span class="cx">                 echo '&lt;label for=&quot;blogname&quot;&gt;' . __('Blog Domain:', 'buddypress') . '&lt;/label&gt;';
</span><span class="lines">@@ -370,18 +370,20 @@
</span><span class="cx">                 &lt;p class=&quot;error&quot;&gt;&lt;?php echo $errmsg ?&gt;&lt;/p&gt;
</span><span class="cx">         &lt;?php }
</span><span class="cx"> 
</span><del>-        if( 'no' == constant( &quot;VHOST&quot; ) ) {
</del><ins>+        if ( !is_subdomain_install() )
</ins><span class="cx">                 echo '&lt;span class=&quot;prefix_address&quot;&gt;' . $current_site-&gt;domain . $current_site-&gt;path . '&lt;/span&gt; &lt;input name=&quot;blogname&quot; type=&quot;text&quot; id=&quot;blogname&quot; value=&quot;'.$blogname.'&quot; maxlength=&quot;50&quot; /&gt;&lt;br /&gt;';
</span><del>-        } else {
</del><ins>+        else
</ins><span class="cx">                 echo '&lt;input name=&quot;blogname&quot; type=&quot;text&quot; id=&quot;blogname&quot; value=&quot;'.$blogname.'&quot; maxlength=&quot;50&quot; /&gt; &lt;span class=&quot;suffix_address&quot;&gt;.' . $current_site-&gt;domain . $current_site-&gt;path . '&lt;/span&gt;&lt;br /&gt;';
</span><del>-        }
</del><ins>+
</ins><span class="cx">         if ( !is_user_logged_in() ) {
</span><span class="cx">                 print '(&lt;strong&gt;' . __( 'Your address will be ' , 'buddypress');
</span><del>-                if( 'no' == constant( &quot;VHOST&quot; ) ) {
</del><ins>+
+                if ( !is_subdomain_install() ) {
</ins><span class="cx">                         print $current_site-&gt;domain . $current_site-&gt;path . __( 'blogname' , 'buddypress');
</span><span class="cx">                 } else {
</span><span class="cx">                         print __( 'domain.' , 'buddypress') . $current_site-&gt;domain . $current_site-&gt;path;
</span><span class="cx">                 }
</span><ins>+
</ins><span class="cx">                 echo '.&lt;/strong&gt; ' . __( 'Must be at least 4 characters, letters and numbers only. It cannot be changed so choose carefully!)' , 'buddypress') . '&lt;/p&gt;';
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branches12bpcorebpcorecatchuriphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-core/bp-core-catchuri.php (3116 => 3117)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-core/bp-core-catchuri.php        2010-07-04 04:50:13 UTC (rev 3116)
+++ branches/1.2/bp-core/bp-core-catchuri.php        2010-07-04 06:07:51 UTC (rev 3117)
</span><span class="lines">@@ -135,7 +135,7 @@
</span><span class="cx">         if ( !isset($is_root_component) )
</span><span class="cx">                 $is_root_component = in_array( $bp_uri[0], $bp-&gt;root_components );
</span><span class="cx"> 
</span><del>-        if ( 'no' == VHOST &amp;&amp; !$is_root_component ) {
</del><ins>+        if ( !is_subdomain_install() &amp;&amp; !$is_root_component ) {
</ins><span class="cx">                 $component_index++;
</span><span class="cx">                 $action_index++;
</span><span class="cx">         }
</span><span class="lines">@@ -154,7 +154,7 @@
</span><span class="cx">         unset($action_variables[$action_index]);
</span><span class="cx"> 
</span><span class="cx">         /* Remove the username from action variables if this is not a VHOST install */
</span><del>-        if ( 'no' == VHOST &amp;&amp; !$is_root_component )
</del><ins>+        if ( !is_subdomain_install() &amp;&amp; !$is_root_component )
</ins><span class="cx">                 array_shift($action_variables);
</span><span class="cx"> 
</span><span class="cx">         /* Reset the keys by merging with an empty array */
</span></span></pre></div>
<a id="branches12bpcorebpcorewpabstractionphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-core/bp-core-wpabstraction.php (3116 => 3117)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-core/bp-core-wpabstraction.php        2010-07-04 04:50:13 UTC (rev 3116)
+++ branches/1.2/bp-core/bp-core-wpabstraction.php        2010-07-04 06:07:51 UTC (rev 3117)
</span><span class="lines">@@ -89,3 +89,12 @@
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span><span class="cx"> }
</span><ins>+
+if ( !function_exists( 'is_subdomain_install' ) ) {
+        function is_subdomain_install() {
+                if ( ( defined( 'VHOST' ) &amp;&amp; 'yes' == VHOST ) || ( defined( 'SUBDOMAIN_INSTALL' ) &amp;&amp; SUBDOMAIN_INSTALL ) )
+                        return true;
+
+                return false;
+        }
+}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branches12bpthemesbpdefaultregistrationregisterphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-themes/bp-default/registration/register.php (3116 => 3117)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-themes/bp-default/registration/register.php        2010-07-04 04:50:13 UTC (rev 3116)
+++ branches/1.2/bp-themes/bp-default/registration/register.php        2010-07-04 06:07:51 UTC (rev 3117)
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx">                                                         &lt;label for=&quot;signup_blog_url&quot;&gt;&lt;?php _e( 'Blog URL', 'buddypress' ) ?&gt; &lt;?php _e( '(required)', 'buddypress' ) ?&gt;&lt;/label&gt;
</span><span class="cx">                                                         &lt;?php do_action( 'bp_signup_blog_url_errors' ) ?&gt;
</span><span class="cx"> 
</span><del>-                                                        &lt;?php if ( 'yes' == VHOST ) : ?&gt;
</del><ins>+                                                        &lt;?php if ( is_subdomain_install() ) : ?&gt;
</ins><span class="cx">                                                                 http:// &lt;input type=&quot;text&quot; name=&quot;signup_blog_url&quot; id=&quot;signup_blog_url&quot; value=&quot;&lt;?php bp_signup_blog_url_value() ?&gt;&quot; /&gt; .&lt;?php echo str_replace( 'http://', '', site_url() ) ?&gt;
</span><span class="cx">                                                         &lt;?php else : ?&gt;
</span><span class="cx">                                                                 &lt;?php echo site_url() ?&gt;/ &lt;input type=&quot;text&quot; name=&quot;signup_blog_url&quot; id=&quot;signup_blog_url&quot; value=&quot;&lt;?php bp_signup_blog_url_value() ?&gt;&quot; /&gt;
</span></span></pre>
</div>
</div>

</body>
</html>