<!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->root_domain );
</span><span class="cx">
</span><span class="cx">         $bp->signup->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 && '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 && '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">                                 <?php do_action( 'bp_after_signup_profile_fields' ) ?>
</span><span class="cx">
</span><del>-                                <?php if ( bp_core_is_multisite() && 'all' == bp_get_signup_allowed() || 'blog' == bp_get_signup_allowed() ) : ?>
</del><ins>+                                <?php if ( bp_get_blog_signup_allowed() ) : ?>
</ins><span class="cx">
</span><span class="cx">                                         <?php do_action( 'bp_before_blog_details_fields' ) ?>
</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">         <?php if ( is_user_logged_in() ) : ?>
</span><span class="cx">
</span><ins>+                <?php do_action( 'bp_before_sidebar_me' ) ?>
+
</ins><span class="cx">                 <div id="sidebar-me">
</span><span class="cx">                         <a href="<?php echo bp_loggedin_user_domain() ?>">
</span><span class="cx">                                 <?php bp_loggedin_user_avatar( 'type=thumb&width=40&height=40' ) ?>
</span><span class="lines">@@ -14,14 +16,20 @@
</span><span class="cx">
</span><span class="cx">                         <h4><?php bp_loggedinuser_link() ?></h4>
</span><span class="cx">                         <a class="button" href="<?php echo wp_logout_url(wp_get_referer()) ?>"><?php _e( 'Log Out', 'buddypress' ) ?></a>
</span><ins>+
+                        <?php do_action( 'bp_sidebar_me' ) ?>
</ins><span class="cx">                 </div>
</span><span class="cx">
</span><ins>+                <?php do_action( 'bp_after_sidebar_me' ) ?>
+
</ins><span class="cx">                 <?php if ( function_exists( 'bp_message_get_notices' ) ) : ?>
</span><span class="cx">                         <?php bp_message_get_notices(); /* Site wide notices to all users */ ?>
</span><span class="cx">                 <?php endif; ?>
</span><span class="cx">
</span><span class="cx">         <?php else : ?>
</span><span class="cx">
</span><ins>+                <?php do_action( 'bp_before_sidebar_login_form' ) ?>
+
</ins><span class="cx">                 <p id="login-text">
</span><span class="cx">                         <?php _e( 'To start connecting please log in first.', 'buddypress' ) ?>
</span><span class="cx">                         <?php if ( bp_get_signup_allowed() ) : ?>
</span><span class="lines">@@ -38,11 +46,15 @@
</span><span class="cx">
</span><span class="cx">                         <p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="userbar_rememberme" value="forever" /> <?php _e( 'Remember Me', 'buddypress' ) ?></label></p>
</span><span class="cx">
</span><ins>+                        <?php do_action( 'bp_sidebar_login_form' ) ?>
+
</ins><span class="cx">                         <input type="submit" name="wp-submit" id="userbar_wp-submit" value="<?php _e('Log In'); ?>" tabindex="100" />
</span><span class="cx">                         <input type="hidden" name="redirect_to" value="<?php bp_root_domain() ?>" />
</span><span class="cx">                         <input type="hidden" name="testcookie" value="1" />
</span><span class="cx">                 </form>
</span><span class="cx">
</span><ins>+                <?php do_action( 'bp_after_sidebar_login_form' ) ?>
+
</ins><span class="cx">         <?php endif; ?>
</span><span class="cx">
</span><span class="cx">         <?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">                                         <input type="submit" name="wp-submit" id="wp-submit" value="<?php _e( 'Log In', 'buddypress' ) ?>"/>
</span><span class="cx">
</span><del>-                                        <?php if ( 'none' != bp_get_signup_allowed() && 'blog' != bp_get_signup_allowed() ) : ?>
</del><ins>+                                        <?php if ( bp_get_signup_allowed() ) : ?>
</ins><span class="cx">                                                 <input type="button" name="signup-submit" id="signup-submit" value="<?php _e( 'Sign Up', 'buddypress' ) ?>" onclick="location.href='<?php echo bp_signup_page() ?>'" />
</span><span class="cx">                                         <?php endif; ?>
</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">                                 <?php do_action( 'bp_after_signup_profile_fields' ) ?>
</span><span class="cx">
</span><del>-                                <?php if ( 'all' == bp_get_signup_allowed() || 'blog' == bp_get_signup_allowed() ) : ?>
</del><ins>+                                <?php if ( bp_get_blog_signup_allowed() ) : ?>
</ins><span class="cx">
</span><span class="cx">                                         <?php do_action( 'bp_before_blog_details_fields' ) ?>
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>