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

<div id="msg">
<dl>
<dt>Revision</dt> <dd>2583</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2010-02-04 12:10:32 +0000 (Thu, 04 Feb 2010)</dd>
</dl>

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

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcorebpcoresignupphp">trunk/bp-core/bp-core-signup.php</a></li>
<li><a href="#trunkbpthemesbpdefaultmembersindexphp">trunk/bp-themes/bp-default/members/index.php</a></li>
<li><a href="#trunkbpthemesbpdefaultregistrationregisterphp">trunk/bp-themes/bp-default/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 (2582 => 2583)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-signup.php        2010-02-04 11:51:04 UTC (rev 2582)
+++ trunk/bp-core/bp-core-signup.php        2010-02-04 12:10:32 UTC (rev 2583)
</span><span class="lines">@@ -52,18 +52,20 @@
</span><span class="cx">                 $bp-&gt;signup-&gt;username = $_POST['signup_username'];
</span><span class="cx">                 $bp-&gt;signup-&gt;email = $_POST['signup_email'];
</span><span class="cx"> 
</span><del>-                /* Now we've checked account details, we can check profile information */
-                $profile_field_ids = explode( ',', $_POST['signup_profile_field_ids'] );
</del><ins>+                if ( !empty( $_POST['signup_profile_field_ids'] ) &amp;&amp; function_exists( 'xprofile_check_is_required_field' ) ) {
+                        /* Now we've checked account details, we can check profile information */
+                        $profile_field_ids = explode( ',', $_POST['signup_profile_field_ids'] );
</ins><span class="cx"> 
</span><del>-                /* Loop through the posted fields formatting any datebox values then validate the field */
-                foreach ( (array) $profile_field_ids as $field_id ) {
-                        if ( !isset( $_POST['field_' . $field_id] ) ) {
-                                if ( isset( $_POST['field_' . $field_id . '_day'] ) )
-                                        $_POST['field_' . $field_id] = strtotime( $_POST['field_' . $field_id . '_day'] . $_POST['field_' . $field_id . '_month'] . $_POST['field_' . $field_id . '_year'] );
</del><ins>+                        /* Loop through the posted fields formatting any datebox values then validate the field */
+                        foreach ( (array) $profile_field_ids as $field_id ) {
+                                if ( !isset( $_POST['field_' . $field_id] ) ) {
+                                        if ( isset( $_POST['field_' . $field_id . '_day'] ) )
+                                                $_POST['field_' . $field_id] = strtotime( $_POST['field_' . $field_id . '_day'] . $_POST['field_' . $field_id . '_month'] . $_POST['field_' . $field_id . '_year'] );
+                                }
+
+                                if ( xprofile_check_is_required_field( $field_id ) &amp;&amp; empty( $_POST['field_' . $field_id] ) )
+                                        $bp-&gt;signup-&gt;errors['field_' . $field_id] = __( 'This is a required field', 'buddypress' );
</ins><span class="cx">                         }
</span><del>-
-                        if ( xprofile_check_is_required_field( $field_id ) &amp;&amp; empty( $_POST['field_' . $field_id] ) )
-                                $bp-&gt;signup-&gt;errors['field_' . $field_id] = __( 'This is a required field', 'buddypress' );
</del><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 /* Finally, let's check the blog details, if the user wants a blog and blog creation is enabled */
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultmembersindexphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/members/index.php (2582 => 2583)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/index.php        2010-02-04 11:51:04 UTC (rev 2582)
+++ trunk/bp-themes/bp-default/members/index.php        2010-02-04 12:10:32 UTC (rev 2583)
</span><span class="lines">@@ -29,8 +29,11 @@
</span><span class="cx">                                                 &lt;select&gt;
</span><span class="cx">                                                         &lt;option value=&quot;active&quot;&gt;&lt;?php _e( 'Last Active', 'buddypress' ) ?&gt;&lt;/option&gt;
</span><span class="cx">                                                         &lt;option value=&quot;newest&quot;&gt;&lt;?php _e( 'Newest Registered', 'buddypress' ) ?&gt;&lt;/option&gt;
</span><del>-                                                        &lt;option value=&quot;alphabetical&quot;&gt;&lt;?php _e( 'Alphabetical', 'buddypress' ) ?&gt;&lt;/option&gt;
</del><span class="cx"> 
</span><ins>+                                                        &lt;?php if ( bp_is_active( 'xprofile' ) ) : ?&gt;
+                                                                &lt;option value=&quot;alphabetical&quot;&gt;&lt;?php _e( 'Alphabetical', 'buddypress' ) ?&gt;&lt;/option&gt;
+                                                        &lt;?php endif; ?&gt;
+
</ins><span class="cx">                                                         &lt;?php do_action( 'bp_members_directory_order_options' ) ?&gt;
</span><span class="cx">                                                 &lt;/select&gt;
</span><span class="cx">                                         &lt;/li&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultregistrationregisterphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/registration/register.php (2582 => 2583)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/registration/register.php        2010-02-04 11:51:04 UTC (rev 2582)
+++ trunk/bp-themes/bp-default/registration/register.php        2010-02-04 12:10:32 UTC (rev 2583)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">                                         &lt;?php do_action( 'bp_signup_password_confirm_errors' ) ?&gt;
</span><span class="cx">                                         &lt;input type=&quot;password&quot; name=&quot;signup_password_confirm&quot; id=&quot;signup_password_confirm&quot; value=&quot;&quot; /&gt;
</span><span class="cx"> 
</span><del>-                                &lt;/div&gt;
</del><ins>+                                &lt;/div&gt;&lt;!-- #basic-details-section --&gt;
</ins><span class="cx"> 
</span><span class="cx">                                 &lt;?php do_action( 'bp_after_account_details_fields' ) ?&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> 
</span><span class="cx">                                 &lt;?php /***** Extra Profile Details ******/ ?&gt;
</span><span class="cx"> 
</span><ins>+                                &lt;?php if ( bp_is_active( 'xprofile' ) ) : ?&gt;
</ins><span class="cx">                                 &lt;div class=&quot;register-section&quot; id=&quot;profile-details-section&quot;&gt;
</span><span class="cx"> 
</span><span class="cx">                                         &lt;h4&gt;&lt;?php _e( 'Profile Details', 'buddypress' ) ?&gt;&lt;/h4&gt;
</span><span class="lines">@@ -154,9 +155,10 @@
</span><span class="cx"> 
</span><span class="cx">                                         &lt;input type=&quot;hidden&quot; name=&quot;signup_profile_field_ids&quot; id=&quot;signup_profile_field_ids&quot; value=&quot;&lt;?php bp_the_profile_group_field_ids() ?&gt;&quot; /&gt;
</span><span class="cx"> 
</span><del>-                                &lt;/div&gt;
</del><ins>+                                        &lt;?php endwhile; endif; endif; ?&gt;
</ins><span class="cx"> 
</span><del>-                                &lt;?php endwhile; endif; endif; ?&gt;
</del><ins>+                                &lt;/div&gt;&lt;!-- #profile-details-section --&gt;
+                                &lt;?php endif; ?&gt;
</ins><span class="cx"> 
</span><span class="cx">                                 &lt;?php do_action( 'bp_after_signup_profile_fields' ) ?&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -195,7 +197,7 @@
</span><span class="cx"> 
</span><span class="cx">                                                 &lt;/div&gt;
</span><span class="cx"> 
</span><del>-                                        &lt;/div&gt;
</del><ins>+                                        &lt;/div&gt;&lt;!-- #blog-details-section --&gt;
</ins><span class="cx"> 
</span><span class="cx">                                         &lt;?php do_action( 'bp_after_blog_details_fields' ) ?&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -204,7 +206,7 @@
</span><span class="cx">                                 &lt;?php do_action( 'bp_before_registration_submit_buttons' ) ?&gt;
</span><span class="cx"> 
</span><span class="cx">                                 &lt;div class=&quot;submit&quot;&gt;
</span><del>-                                        &lt;input type=&quot;submit&quot; name=&quot;signup_submit&quot; id=&quot;signup_submit&quot; value=&quot;&lt;?php _e( 'Complete Sign Up', 'buddypress' ) ?&gt; &amp;rarr;&quot; /&gt;
</del><ins>+                                        &lt;input type=&quot;submit&quot;name=&quot;signup_submit&quot; id=&quot;signup_submit&quot; value=&quot;&lt;?php _e( 'Complete Sign Up', 'buddypress' ) ?&gt; &amp;rarr;&quot; /&gt;
</ins><span class="cx">                                 &lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx">                                 &lt;?php do_action( 'bp_after_registration_submit_buttons' ) ?&gt;
</span><span class="lines">@@ -225,7 +227,7 @@
</span><span class="cx">                                         &lt;p&gt;&lt;?php _e( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ) ?&gt;&lt;/p&gt;
</span><span class="cx">                                 &lt;?php endif; ?&gt;
</span><span class="cx"> 
</span><del>-                                &lt;?php if ( !(int)get_site_option( 'bp-disable-avatar-uploads' ) ) : ?&gt;
</del><ins>+                                &lt;?php if ( bp_is_active( 'xprofile' ) &amp;&amp; !(int)get_site_option( 'bp-disable-avatar-uploads' ) ) : ?&gt;
</ins><span class="cx"> 
</span><span class="cx">                                         &lt;?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?&gt;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>