<!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] [2464] trunk: Fixes #1690</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>2464</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2010-01-27 12:15:46 +0000 (Wed, 27 Jan 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fixes #1690</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcorebpcoresignupphp">trunk/bp-core/bp-core-signup.php</a></li>
<li><a href="#trunkbpcorebpcoretemplatetagsphp">trunk/bp-core/bp-core-templatetags.php</a></li>
<li><a href="#trunkbpthemesbpdefaultregistrationregisterphp">trunk/bp-themes/bp-default/registration/register.php</a></li>
<li><a href="#trunkbpthemesbpdefaultsidebarphp">trunk/bp-themes/bp-default/sidebar.php</a></li>
<li><a href="#trunkbpthemesbpsnparentheaderphp">trunk/bp-themes/bp-sn-parent/header.php</a></li>
<li><a href="#trunkbpthemesbpsnparentregistrationregisterphp">trunk/bp-themes/bp-sn-parent/registration/register.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcorebpcoresignupphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-signup.php (2463 => 2464)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-signup.php        2010-01-27 11:24:01 UTC (rev 2463)
+++ trunk/bp-core/bp-core-signup.php        2010-01-27 12:15:46 UTC (rev 2464)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><span class="cx">         /* If signups are disabled, just re-direct */
</span><del>-        if ( !bp_get_signup_allowed() || 'none' == bp_get_signup_allowed() || 'blog' == bp_get_signup_allowed() )
</del><ins>+        if ( !bp_get_signup_allowed() )
</ins><span class="cx">                 bp_core_redirect( $bp-&gt;root_domain );
</span><span class="cx"> 
</span><span class="cx">         $bp-&gt;signup-&gt;step = 'request-details';
</span></span></pre></div>
<a id="trunkbpcorebpcoretemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-templatetags.php (2463 => 2464)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-templatetags.php        2010-01-27 11:24:01 UTC (rev 2463)
+++ trunk/bp-core/bp-core-templatetags.php        2010-01-27 12:15:46 UTC (rev 2464)
</span><span class="lines">@@ -1239,9 +1239,13 @@
</span><span class="cx">         echo bp_get_signup_allowed();
</span><span class="cx"> }
</span><span class="cx">         function bp_get_signup_allowed() {
</span><del>-                if ( bp_core_is_multisite() )
-                        return get_site_option( 'registration' );
-                else {
</del><ins>+                if ( bp_core_is_multisite() ) {
+                        $status = get_site_option( 'registration' );
+                        if ( 'all' != $status &amp;&amp; 'user' != $status )
+                                return false;
+
+                        return true;
+                } else {
</ins><span class="cx">                         if ( (int)get_option( 'users_can_register') )
</span><span class="cx">                                 return 'user';
</span><span class="cx">                 }
</span><span class="lines">@@ -1249,6 +1253,20 @@
</span><span class="cx">                 return false;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+function bp_blog_signup_allowed() {
+        echo bp_get_blog_signup_allowed();
+}
+        function bp_get_blog_signup_allowed() {
+                if ( !bp_core_is_multisite() )
+                        return false;
+
+                $status = get_site_option( 'registration' );
+                if ( 'none' != $status &amp;&amp; 'user' != $status )
+                        return true;
+
+                return false;
+        }
+
</ins><span class="cx"> function bp_account_was_activated() {
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultregistrationregisterphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/registration/register.php (2463 => 2464)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/registration/register.php        2010-01-27 11:24:01 UTC (rev 2463)
+++ trunk/bp-themes/bp-default/registration/register.php        2010-01-27 12:15:46 UTC (rev 2464)
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx"> 
</span><span class="cx">                                 &lt;?php do_action( 'bp_after_signup_profile_fields' ) ?&gt;
</span><span class="cx"> 
</span><del>-                                &lt;?php if ( bp_core_is_multisite() &amp;&amp; 'all' == bp_get_signup_allowed() || 'blog' == bp_get_signup_allowed() ) : ?&gt;
</del><ins>+                                &lt;?php if ( bp_get_blog_signup_allowed() ) : ?&gt;
</ins><span class="cx"> 
</span><span class="cx">                                         &lt;?php do_action( 'bp_before_blog_details_fields' ) ?&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultsidebarphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/sidebar.php (2463 => 2464)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/sidebar.php        2010-01-27 11:24:01 UTC (rev 2463)
+++ trunk/bp-themes/bp-default/sidebar.php        2010-01-27 12:15:46 UTC (rev 2464)
</span><span class="lines">@@ -7,6 +7,8 @@
</span><span class="cx"> 
</span><span class="cx">         &lt;?php if ( is_user_logged_in() ) : ?&gt;
</span><span class="cx"> 
</span><ins>+                &lt;?php do_action( 'bp_before_sidebar_me' ) ?&gt;
+
</ins><span class="cx">                 &lt;div id=&quot;sidebar-me&quot;&gt;
</span><span class="cx">                         &lt;a href=&quot;&lt;?php echo bp_loggedin_user_domain() ?&gt;&quot;&gt;
</span><span class="cx">                                 &lt;?php bp_loggedin_user_avatar( 'type=thumb&amp;width=40&amp;height=40' ) ?&gt;
</span><span class="lines">@@ -14,14 +16,20 @@
</span><span class="cx"> 
</span><span class="cx">                         &lt;h4&gt;&lt;?php bp_loggedinuser_link() ?&gt;&lt;/h4&gt;
</span><span class="cx">                         &lt;a class=&quot;button&quot; href=&quot;&lt;?php echo wp_logout_url(wp_get_referer()) ?&gt;&quot;&gt;&lt;?php _e( 'Log Out', 'buddypress' ) ?&gt;&lt;/a&gt;
</span><ins>+
+                        &lt;?php do_action( 'bp_sidebar_me' ) ?&gt;
</ins><span class="cx">                 &lt;/div&gt;
</span><span class="cx"> 
</span><ins>+                &lt;?php do_action( 'bp_after_sidebar_me' ) ?&gt;
+
</ins><span class="cx">                 &lt;?php if ( function_exists( 'bp_message_get_notices' ) ) : ?&gt;
</span><span class="cx">                         &lt;?php bp_message_get_notices(); /* Site wide notices to all users */ ?&gt;
</span><span class="cx">                 &lt;?php endif; ?&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;?php else : ?&gt;
</span><span class="cx"> 
</span><ins>+                &lt;?php do_action( 'bp_before_sidebar_login_form' ) ?&gt;
+
</ins><span class="cx">                 &lt;p id=&quot;login-text&quot;&gt;
</span><span class="cx">                         &lt;?php _e( 'To start connecting please log in first.', 'buddypress' ) ?&gt;
</span><span class="cx">                         &lt;?php if ( bp_get_signup_allowed() ) : ?&gt;
</span><span class="lines">@@ -38,11 +46,15 @@
</span><span class="cx"> 
</span><span class="cx">                         &lt;p class=&quot;forgetmenot&quot;&gt;&lt;label&gt;&lt;input name=&quot;rememberme&quot; type=&quot;checkbox&quot; id=&quot;userbar_rememberme&quot; value=&quot;forever&quot; /&gt; &lt;?php _e( 'Remember Me', 'buddypress' ) ?&gt;&lt;/label&gt;&lt;/p&gt;
</span><span class="cx"> 
</span><ins>+                        &lt;?php do_action( 'bp_sidebar_login_form' ) ?&gt;
+
</ins><span class="cx">                         &lt;input type=&quot;submit&quot; name=&quot;wp-submit&quot; id=&quot;userbar_wp-submit&quot; value=&quot;&lt;?php _e('Log In'); ?&gt;&quot; tabindex=&quot;100&quot; /&gt;
</span><span class="cx">                         &lt;input type=&quot;hidden&quot; name=&quot;redirect_to&quot; value=&quot;&lt;?php bp_root_domain() ?&gt;&quot; /&gt;
</span><span class="cx">                         &lt;input type=&quot;hidden&quot; name=&quot;testcookie&quot; value=&quot;1&quot; /&gt;
</span><span class="cx">                 &lt;/form&gt;
</span><span class="cx"> 
</span><ins>+                &lt;?php do_action( 'bp_after_sidebar_login_form' ) ?&gt;
+
</ins><span class="cx">         &lt;?php endif; ?&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;?php /* Show forum tags on the forums directory */
</span></span></pre></div>
<a id="trunkbpthemesbpsnparentheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-sn-parent/header.php (2463 => 2464)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/header.php        2010-01-27 11:24:01 UTC (rev 2463)
+++ trunk/bp-themes/bp-sn-parent/header.php        2010-01-27 12:15:46 UTC (rev 2464)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> 
</span><span class="cx">                                         &lt;input type=&quot;submit&quot; name=&quot;wp-submit&quot; id=&quot;wp-submit&quot; value=&quot;&lt;?php _e( 'Log In', 'buddypress' ) ?&gt;&quot;/&gt;
</span><span class="cx"> 
</span><del>-                                        &lt;?php if ( 'none' != bp_get_signup_allowed() &amp;&amp; 'blog' != bp_get_signup_allowed() ) : ?&gt;
</del><ins>+                                        &lt;?php if ( bp_get_signup_allowed() ) : ?&gt;
</ins><span class="cx">                                                 &lt;input type=&quot;button&quot; name=&quot;signup-submit&quot; id=&quot;signup-submit&quot; value=&quot;&lt;?php _e( 'Sign Up', 'buddypress' ) ?&gt;&quot; onclick=&quot;location.href='&lt;?php echo bp_signup_page() ?&gt;'&quot; /&gt;
</span><span class="cx">                                         &lt;?php endif; ?&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpthemesbpsnparentregistrationregisterphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-sn-parent/registration/register.php (2463 => 2464)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/registration/register.php        2010-01-27 11:24:01 UTC (rev 2463)
+++ trunk/bp-themes/bp-sn-parent/registration/register.php        2010-01-27 12:15:46 UTC (rev 2464)
</span><span class="lines">@@ -159,7 +159,7 @@
</span><span class="cx"> 
</span><span class="cx">                                 &lt;?php do_action( 'bp_after_signup_profile_fields' ) ?&gt;
</span><span class="cx"> 
</span><del>-                                &lt;?php if ( 'all' == bp_get_signup_allowed() || 'blog' == bp_get_signup_allowed() ) : ?&gt;
</del><ins>+                                &lt;?php if ( bp_get_blog_signup_allowed() ) : ?&gt;
</ins><span class="cx"> 
</span><span class="cx">                                         &lt;?php do_action( 'bp_before_blog_details_fields' ) ?&gt;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>