<!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] [2075] branches/1.1: Applying jjj trunk fixes to 1.1 branch.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>2075</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2009-11-02 18:26:55 +0000 (Mon, 02 Nov 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>Applying jjj trunk fixes to 1.1 branch.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branches11bpactivitybpactivitytemplatetagsphp">branches/1.1/bp-activity/bp-activity-templatetags.php</a></li>
<li><a href="#branches11bpcorebpcoreavatarsphp">branches/1.1/bp-core/bp-core-avatars.php</a></li>
<li><a href="#branches11bpcorebpcoresignupphp">branches/1.1/bp-core/bp-core-signup.php</a></li>
<li><a href="#branches11bpcorebpcoretemplatetagsphp">branches/1.1/bp-core/bp-core-templatetags.php</a></li>
<li><a href="#branches11bpcoredeprecatedbpcoredeprecatedphp">branches/1.1/bp-core/deprecated/bp-core-deprecated.php</a></li>
<li><a href="#branches11bpgroupsphp">branches/1.1/bp-groups.php</a></li>
<li><a href="#branches11bpxprofilebpxprofileadminphp">branches/1.1/bp-xprofile/bp-xprofile-admin.php</a></li>
<li><a href="#branches11bpxprofilebpxprofileclassesphp">branches/1.1/bp-xprofile/bp-xprofile-classes.php</a></li>
<li><a href="#branches11bpxprofilebpxprofiletemplatetagsphp">branches/1.1/bp-xprofile/bp-xprofile-templatetags.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branches11bpactivitybpactivitytemplatetagsphp"></a>
<div class="modfile"><h4>Modified: branches/1.1/bp-activity/bp-activity-templatetags.php (2074 => 2075)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.1/bp-activity/bp-activity-templatetags.php        2009-11-02 17:58:02 UTC (rev 2074)
+++ branches/1.1/bp-activity/bp-activity-templatetags.php        2009-11-02 18:26:55 UTC (rev 2075)
</span><span class="lines">@@ -237,7 +237,7 @@
</span><span class="cx">                 
</span><span class="cx">                 $object = apply_filters( 'bp_get_activity_avatar_object_' . $activities_template-&gt;activity-&gt;component_name, $object );
</span><span class="cx">                 
</span><del>-                return apply_filters( 'bp_get_group_avatar', bp_core_fetch_avatar( array( 'item_id' =&gt; $item_id, 'object' =&gt; $object, 'type' =&gt; $type, 'alt' =&gt; $alt, 'class' =&gt; $class, 'width' =&gt; $width, 'height' =&gt; $height ) ) );
</del><ins>+                return apply_filters( 'bp_get_activity_avatar', bp_core_fetch_avatar( array( 'item_id' =&gt; $item_id, 'object' =&gt; $object, 'type' =&gt; $type, 'alt' =&gt; $alt, 'class' =&gt; $class, 'width' =&gt; $width, 'height' =&gt; $height ) ) );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx"> function bp_activity_content() {
</span></span></pre></div>
<a id="branches11bpcorebpcoreavatarsphp"></a>
<div class="modfile"><h4>Modified: branches/1.1/bp-core/bp-core-avatars.php (2074 => 2075)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.1/bp-core/bp-core-avatars.php        2009-11-02 17:58:02 UTC (rev 2074)
+++ branches/1.1/bp-core/bp-core-avatars.php        2009-11-02 18:26:55 UTC (rev 2075)
</span><span class="lines">@@ -92,9 +92,31 @@
</span><span class="cx">         
</span><span class="cx">         $avatar_folder_url = apply_filters( 'bp_core_avatar_folder_url', get_blog_option( BP_ROOT_BLOG, 'siteurl' ) . '/' . basename( WP_CONTENT_DIR ) . '/blogs.dir/' . BP_ROOT_BLOG . '/files/' . $avatar_dir . '/' . $item_id, $item_id, $object, $avatar_dir );        
</span><span class="cx">         $avatar_folder_dir = apply_filters( 'bp_core_avatar_folder_dir', WP_CONTENT_DIR . '/blogs.dir/' . BP_ROOT_BLOG . '/files/' . $avatar_dir . '/' . $item_id, $item_id, $object, $avatar_dir );        
</span><del>-        
</del><ins>+
+        /****
+         * Look for uploaded avatar first. Use it if it exists.
+         * Set the file names to search for, to select the full size
+         * or thumbnail image.
+         */
+        $avatar_name = ( 'full' == $type ) ? '-bpfull' : '-bpthumb';
+        $legacy_user_avatar_name = ( 'full' == $type ) ? '-avatar2' : '-avatar1';
+        $legacy_group_avatar_name = ( 'full' == $type ) ? '-groupavatar-full' : '-groupavatar-thumb';
+
+        if ( file_exists( $avatar_folder_dir ) ) {
+                if ( $av_dir = opendir( $avatar_folder_dir ) ) {
+                        while ( false !== ( $avatar_file = readdir($av_dir) ) ) {
+                                if ( preg_match( &quot;/{$avatar_name}/&quot;, $avatar_file ) || preg_match( &quot;/{$legacy_user_avatar_name}/&quot;, $avatar_file ) || preg_match( &quot;/{$legacy_group_avatar_name}/&quot;, $avatar_file ) )
+                                        $avatar_url = $avatar_folder_url . '/' . $avatar_file;
+                        }
+                }
+                closedir($av_dir);
+
+                if ( $avatar_url )
+                        return apply_filters( 'bp_core_fetch_avatar', &quot;&lt;img src='{$avatar_url}' alt='{$alt}' id='{$css_id}' class='{$class}'{$html_width}{$html_height} /&gt;&quot;, $params );
+        }
+
</ins><span class="cx">         /* If no avatars have been uploaded for this item, display a gravatar */        
</span><del>-        if ( !file_exists( $avatar_folder_dir ) &amp;&amp; !$no_grav ) {
</del><ins>+        if ( !file_exists( $avatar_url ) &amp;&amp; !$no_grav ) {
</ins><span class="cx">                 
</span><span class="cx">                 if ( empty( $bp-&gt;grav_default-&gt;{$object} ) )
</span><span class="cx">                         $default_grav = 'wavatar';
</span><span class="lines">@@ -119,23 +141,9 @@
</span><span class="cx">                 
</span><span class="cx">                 return apply_filters( 'bp_core_fetch_avatar', &quot;&lt;img src='{$gravatar}' alt='{$alt}' id='{$css_id}' class='{$class}'{$html_width}{$html_height} /&gt;&quot;, $params );
</span><span class="cx">         
</span><del>-        } else if ( !file_exists( $avatar_folder_dir ) &amp;&amp; $no_grav )
</del><ins>+        } else if ( !file_exists( $avatar_url ) &amp;&amp; $no_grav )
</ins><span class="cx">                 return false;
</span><span class="cx">         
</span><del>-        /* Set the file names to search for to select the full size or thumbnail image. */
-        $avatar_name = ( 'full' == $type ) ? '-bpfull' : '-bpthumb';        
-        $legacy_user_avatar_name = ( 'full' == $type ) ? '-avatar2' : '-avatar1';        
-        $legacy_group_avatar_name = ( 'full' == $type ) ? '-groupavatar-full' : '-groupavatar-thumb';        
-        
-        if ( $av_dir = opendir( $avatar_folder_dir ) ) {
-            while ( false !== ( $avatar_file = readdir($av_dir) ) ) {
-                        if ( preg_match( &quot;/{$avatar_name}/&quot;, $avatar_file ) || preg_match( &quot;/{$legacy_user_avatar_name}/&quot;, $avatar_file ) || preg_match( &quot;/{$legacy_group_avatar_name}/&quot;, $avatar_file ) )
-                                $avatar_url = $avatar_folder_url . '/' . $avatar_file;
-            }
-        }
-    closedir($av_dir);
-
-        return apply_filters( 'bp_core_fetch_avatar', &quot;&lt;img src='{$avatar_url}' alt='{$alt}' id='{$css_id}' class='{$class}'{$html_width}{$html_height} /&gt;&quot;, $params );        
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function bp_core_delete_existing_avatar( $args = '' ) {
</span></span></pre></div>
<a id="branches11bpcorebpcoresignupphp"></a>
<div class="modfile"><h4>Modified: branches/1.1/bp-core/bp-core-signup.php (2074 => 2075)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.1/bp-core/bp-core-signup.php        2009-11-02 17:58:02 UTC (rev 2074)
+++ branches/1.1/bp-core/bp-core-signup.php        2009-11-02 18:26:55 UTC (rev 2075)
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx">                 $bp-&gt;avatar_admin-&gt;step = 'upload-image';
</span><span class="cx"> 
</span><span class="cx">                 if ( !bp_core_avatar_handle_crop( array( 'original_file' =&gt; $_POST['image_src'], 'crop_x' =&gt; $_POST['x'], 'crop_y' =&gt; $_POST['y'], 'crop_w' =&gt; $_POST['w'], 'crop_h' =&gt; $_POST['h'] ) ) )
</span><del>-                        bp_core_add_message( __( 'There was a problem cropping your avatar, please try uploading it again', 'buddypress' ) );
</del><ins>+                        bp_core_add_message( __( 'There was a problem cropping your avatar, please try uploading it again', 'buddypress' ), 'error' );
</ins><span class="cx">                 else
</span><span class="cx">                         bp_core_add_message( __( 'Your new avatar was uploaded successfully', 'buddypress' ) );
</span><span class="cx"> 
</span><span class="lines">@@ -208,12 +208,8 @@
</span><span class="cx">         if ( false === strpos( $_SERVER['SCRIPT_NAME'], 'wp-signup.php') )
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><del>-        if ( '' != locate_template( array( 'registration/register.php' ), false ) || '' != locate_template( array( 'register.php' ), false ) )
-                die;
</del><ins>+        if ( locate_template( array( 'registration/register.php' ), false ) || locate_template( array( 'register.php' ), false ) ) 
+                wp_redirect( bp_root_domain() . BP_REGISTER_SLUG );
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'signup_header', 'bp_core_wpsignup_redirect' );
</span><del>-
-
-
-
</del><span class="cx"> ?&gt;
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branches11bpcorebpcoretemplatetagsphp"></a>
<div class="modfile"><h4>Modified: branches/1.1/bp-core/bp-core-templatetags.php (2074 => 2075)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.1/bp-core/bp-core-templatetags.php        2009-11-02 17:58:02 UTC (rev 2074)
+++ branches/1.1/bp-core/bp-core-templatetags.php        2009-11-02 18:26:55 UTC (rev 2075)
</span><span class="lines">@@ -1466,6 +1466,15 @@
</span><span class="cx">         return false;        
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+function bp_is_group_single() { 
+        global $bp; 
+
+        if ( BP_GROUPS_SLUG == $bp-&gt;current_component &amp;&amp; $bp-&gt;is_single_item ) 
+                return true; 
+
+        return false; 
+}
+
</ins><span class="cx"> function bp_is_user_blogs() {
</span><span class="cx">         global $bp;
</span><span class="cx">         
</span></span></pre></div>
<a id="branches11bpcoredeprecatedbpcoredeprecatedphp"></a>
<div class="modfile"><h4>Modified: branches/1.1/bp-core/deprecated/bp-core-deprecated.php (2074 => 2075)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.1/bp-core/deprecated/bp-core-deprecated.php        2009-11-02 17:58:02 UTC (rev 2074)
+++ branches/1.1/bp-core/deprecated/bp-core-deprecated.php        2009-11-02 18:26:55 UTC (rev 2075)
</span><span class="lines">@@ -749,7 +749,7 @@
</span><span class="cx"> /*** BEGIN DEPRECATED OLD BUDDYPRESS THEME SUPPORT ************/
</span><span class="cx"> 
</span><span class="cx"> /***
</span><del>- * In older versions of BuddyPress, BuddyPress templates were in a seperate theme.
</del><ins>+ * In older versions of BuddyPress, BuddyPress templates were in a separate theme.
</ins><span class="cx">  * The child theme setup makes upgrades and extending themes much easier, so the
</span><span class="cx">  * old method was deprecated.
</span><span class="cx">  */
</span></span></pre></div>
<a id="branches11bpgroupsphp"></a>
<div class="modfile"><h4>Modified: branches/1.1/bp-groups.php (2074 => 2075)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.1/bp-groups.php        2009-11-02 17:58:02 UTC (rev 2074)
+++ branches/1.1/bp-groups.php        2009-11-02 18:26:55 UTC (rev 2075)
</span><span class="lines">@@ -544,7 +544,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        /* Group avatar is handled seperately */
</del><ins>+        /* Group avatar is handled separately */
</ins><span class="cx">         if ( 'group-avatar' == $bp-&gt;groups-&gt;current_create_step &amp;&amp; isset( $_POST['upload'] ) ) {
</span><span class="cx">                 if ( !empty( $_FILES ) &amp;&amp; isset( $_POST['upload'] ) ) {
</span><span class="cx">                         /* Normally we would check a nonce here, but the group save nonce is used instead */
</span><span class="lines">@@ -1153,6 +1153,12 @@
</span><span class="cx">                 
</span><span class="cx">                 if ( 'demote' == $bp-&gt;action_variables[1] &amp;&amp; is_numeric( $bp-&gt;action_variables[2] ) ) {
</span><span class="cx">                         $user_id = $bp-&gt;action_variables[2];
</span><ins>+                        
+                        /* Check if the user is the group admin first. */ 
+                        if ( groups_is_user_admin( $bp-&gt;loggedin_user-&gt;id, $bp-&gt;groups-&gt;current_group-&gt;id ) ) { 
+                                bp_core_add_message(  __('As the only group administrator, you cannot demote yourself.', 'buddypress'), 'error' ); 
+                                bp_core_redirect( bp_get_group_permalink( $bp-&gt;groups-&gt;current_group ) ); 
+                        }                
</ins><span class="cx"> 
</span><span class="cx">                         /* Check the nonce first. */
</span><span class="cx">                         if ( !check_admin_referer( 'groups_demote_member' ) )
</span><span class="lines">@@ -1173,6 +1179,12 @@
</span><span class="cx">                 if ( 'ban' == $bp-&gt;action_variables[1] &amp;&amp; is_numeric( $bp-&gt;action_variables[2] ) ) {
</span><span class="cx">                         $user_id = $bp-&gt;action_variables[2];
</span><span class="cx"> 
</span><ins>+                        /* Check if the user is the group admin first. */ 
+                        if ( groups_is_user_admin( $bp-&gt;loggedin_user-&gt;id, $bp-&gt;groups-&gt;current_group-&gt;id ) ) { 
+                                bp_core_add_message(  __('As the only group administrator, you cannot ban yourself.', 'buddypress'), 'error' ); 
+                                bp_core_redirect( bp_get_group_permalink( $bp-&gt;groups-&gt;current_group ) ); 
+                        }
+                        
</ins><span class="cx">                         /* Check the nonce first. */
</span><span class="cx">                         if ( !check_admin_referer( 'groups_ban_member' ) )
</span><span class="cx">                                 return false;
</span></span></pre></div>
<a id="branches11bpxprofilebpxprofileadminphp"></a>
<div class="modfile"><h4>Modified: branches/1.1/bp-xprofile/bp-xprofile-admin.php (2074 => 2075)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.1/bp-xprofile/bp-xprofile-admin.php        2009-11-02 17:58:02 UTC (rev 2074)
+++ branches/1.1/bp-xprofile/bp-xprofile-admin.php        2009-11-02 18:26:55 UTC (rev 2075)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">                                                         
</span><span class="cx">                                                                         &lt;tr id=&quot;field_&lt;?php echo attribute_escape( $field-&gt;id ); ?&gt;&quot; class=&quot;sortable&lt;?php if ( $class ) { echo ' ' . $class; } ?&gt;&quot;&gt;
</span><span class="cx">                                                                             &lt;td width=&quot;10&quot;&gt;&lt;img src=&quot;&lt;?php echo BP_PLUGIN_URL ?&gt;/bp-xprofile/admin/images/move.gif&quot; alt=&quot;&lt;?php _e( 'Drag', 'buddypress' ) ?&gt;&quot; /&gt;&lt;/td&gt;
</span><del>-                                                                                &lt;td&gt;&lt;span title=&quot;&lt;?php echo $field-&gt;desc; ?&gt;&quot;&gt;&lt;?php echo attribute_escape( $field-&gt;name ); ?&gt; &lt;?php if(!$field-&gt;can_delete) { ?&gt; &lt;?php _e( '(Core Field)', 'buddypress' ) ?&gt;&lt;?php } ?&gt;&lt;/span&gt;&lt;/td&gt;
</del><ins>+                                                                                &lt;td&gt;&lt;span title=&quot;&lt;?php echo $field-&gt;description; ?&gt;&quot;&gt;&lt;?php echo attribute_escape( $field-&gt;name ); ?&gt; &lt;?php if(!$field-&gt;can_delete) { ?&gt; &lt;?php _e( '(Core Field)', 'buddypress' ) ?&gt;&lt;?php } ?&gt;&lt;/span&gt;&lt;/td&gt;
</ins><span class="cx">                                                                             &lt;td&gt;&lt;?php echo attribute_escape( $field-&gt;type ); ?&gt;&lt;/td&gt;
</span><span class="cx">                                                                             &lt;td style=&quot;text-align:center;&quot;&gt;&lt;?php if ( $field-&gt;is_required ) { echo '&lt;img src=&quot;' . BP_PLUGIN_URL . '/bp-xprofile/admin/images/tick.gif&quot; alt=&quot;' . __( 'Yes', 'buddypress' ) . '&quot; /&gt;'; } else { ?&gt;--&lt;?php } ?&gt;&lt;/td&gt;
</span><span class="cx">                                                                             &lt;td style=&quot;text-align:center;&quot;&gt;&lt;?php if ( !$field-&gt;can_delete ) { ?&gt;&lt;strike&gt;&lt;?php _e( 'Edit', 'buddypress' ) ?&gt;&lt;/strike&gt;&lt;?php } else { ?&gt;&lt;a class=&quot;edit&quot; href=&quot;admin.php?page=bp-profile-setup&amp;amp;group_id=&lt;?php echo attribute_escape( $groups[$i]-&gt;id ); ?&gt;&amp;amp;field_id=&lt;?php echo attribute_escape( $field-&gt;id ); ?&gt;&amp;amp;mode=edit_field&quot;&gt;&lt;?php _e( 'Edit', 'buddypress' ) ?&gt;&lt;/a&gt;&lt;?php } ?&gt;&lt;/td&gt;
</span><span class="lines">@@ -216,7 +216,7 @@
</span><span class="cx">         if ( isset($_POST['saveField']) ) {
</span><span class="cx">                 if ( BP_XProfile_Field::admin_validate() ) {
</span><span class="cx">                         $field-&gt;name = wp_filter_kses( $_POST['title'] );
</span><del>-                        $field-&gt;desc = wp_filter_kses( $_POST['description'] );
</del><ins>+                        $field-&gt;description = wp_filter_kses( $_POST['description'] );
</ins><span class="cx">                         $field-&gt;is_required = wp_filter_kses( $_POST['required'] );
</span><span class="cx">                         $field-&gt;type = wp_filter_kses( $_POST['fieldtype'] );
</span><span class="cx">                         $field-&gt;order_by = wp_filter_kses( $_POST[&quot;sort_order_{$field-&gt;type}&quot;] );
</span></span></pre></div>
<a id="branches11bpxprofilebpxprofileclassesphp"></a>
<div class="modfile"><h4>Modified: branches/1.1/bp-xprofile/bp-xprofile-classes.php (2074 => 2075)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.1/bp-xprofile/bp-xprofile-classes.php        2009-11-02 17:58:02 UTC (rev 2074)
+++ branches/1.1/bp-xprofile/bp-xprofile-classes.php        2009-11-02 18:26:55 UTC (rev 2075)
</span><span class="lines">@@ -181,7 +181,7 @@
</span><span class="cx">         var $parent_id;
</span><span class="cx">         var $type;
</span><span class="cx">         var $name;
</span><del>-        var $desc;
</del><ins>+        var $description;
</ins><span class="cx">         var $is_required;
</span><span class="cx">         var $can_delete;
</span><span class="cx">         var $field_order;
</span><span class="lines">@@ -214,7 +214,7 @@
</span><span class="cx">                         $this-&gt;parent_id = $field-&gt;parent_id;
</span><span class="cx">                         $this-&gt;type = $field-&gt;type;
</span><span class="cx">                         $this-&gt;name = stripslashes($field-&gt;name);
</span><del>-                        $this-&gt;desc = stripslashes($field-&gt;description);
</del><ins>+                        $this-&gt;description = stripslashes($field-&gt;description);
</ins><span class="cx">                         $this-&gt;is_required = $field-&gt;is_required;
</span><span class="cx">                         $this-&gt;can_delete = $field-&gt;can_delete;
</span><span class="cx">                         $this-&gt;field_order = $field-&gt;field_order;
</span><span class="lines">@@ -256,7 +256,7 @@
</span><span class="cx">                 $this-&gt;parent_id = apply_filters( 'xprofile_field_parent_id_before_save', $this-&gt;parent_id, $this-&gt;id );
</span><span class="cx">                 $this-&gt;type = apply_filters( 'xprofile_field_type_before_save', $this-&gt;type, $this-&gt;id );
</span><span class="cx">                 $this-&gt;name = apply_filters( 'xprofile_field_name_before_save', $this-&gt;name, $this-&gt;id );
</span><del>-                $this-&gt;desc = apply_filters( 'xprofile_field_description_before_save', $this-&gt;desc, $this-&gt;id );
</del><ins>+                $this-&gt;description = apply_filters( 'xprofile_field_description_before_save', $this-&gt;description, $this-&gt;id );
</ins><span class="cx">                 $this-&gt;is_required = apply_filters( 'xprofile_field_is_required_before_save', $this-&gt;is_required, $this-&gt;id );
</span><span class="cx">                 $this-&gt;order_by = apply_filters( 'xprofile_field_order_by_before_save', $this-&gt;order_by, $this-&gt;id );
</span><span class="cx">                 $this-&gt;field_order = apply_filters( 'xprofile_field_field_order_before_save', $this-&gt;field_order, $this-&gt;id );
</span><span class="lines">@@ -264,9 +264,9 @@
</span><span class="cx">                 do_action( 'xprofile_field_before_save', $this );
</span><span class="cx">                 
</span><span class="cx">                 if ( $this-&gt;id != null )
</span><del>-                        $sql = $wpdb-&gt;prepare(&quot;UPDATE {$bp-&gt;profile-&gt;table_name_fields} SET group_id = %d, parent_id = 0, type = %s, name = %s, description = %s, is_required = %d, order_by = %s, field_order = %d WHERE id = %d&quot;, $this-&gt;group_id, $this-&gt;type, $this-&gt;name, $this-&gt;desc, $this-&gt;is_required, $this-&gt;order_by, $this-&gt;field_order, $this-&gt;id);
</del><ins>+                        $sql = $wpdb-&gt;prepare(&quot;UPDATE {$bp-&gt;profile-&gt;table_name_fields} SET group_id = %d, parent_id = 0, type = %s, name = %s, description = %s, is_required = %d, order_by = %s, field_order = %d WHERE id = %d&quot;, $this-&gt;group_id, $this-&gt;type, $this-&gt;name, $this-&gt;description, $this-&gt;is_required, $this-&gt;order_by, $this-&gt;field_order, $this-&gt;id);
</ins><span class="cx">                 else
</span><del>-                        $sql = $wpdb-&gt;prepare(&quot;INSERT INTO {$bp-&gt;profile-&gt;table_name_fields} (group_id, parent_id, type, name, description, is_required, order_by, field_order ) VALUES (%d, 0, %s, %s, %s, %d, %s, %d )&quot;, $this-&gt;group_id, $this-&gt;type, $this-&gt;name, $this-&gt;desc, $this-&gt;is_required, $this-&gt;order_by, $this-&gt;field_order );
</del><ins>+                        $sql = $wpdb-&gt;prepare(&quot;INSERT INTO {$bp-&gt;profile-&gt;table_name_fields} (group_id, parent_id, type, name, description, is_required, order_by, field_order ) VALUES (%d, 0, %s, %s, %s, %d, %s, %d )&quot;, $this-&gt;group_id, $this-&gt;type, $this-&gt;name, $this-&gt;description, $this-&gt;is_required, $this-&gt;order_by, $this-&gt;field_order );
</ins><span class="cx"> 
</span><span class="cx">                 // Check for null so field options can be changed without changing any other part of the field.
</span><span class="cx">                 // The described situation will return 0 here.
</span><span class="lines">@@ -519,7 +519,7 @@
</span><span class="cx">                         $action = &quot;admin.php?page=bp-profile-setup&amp;amp;group_id=&quot; . $this-&gt;group_id . &quot;&amp;amp;mode=add_field&quot;;
</span><span class="cx"> 
</span><span class="cx">                         $this-&gt;name                        = $_POST['title'];
</span><del>-                        $this-&gt;desc                        = $_POST['description'];
</del><ins>+                        $this-&gt;description        = $_POST['description'];
</ins><span class="cx">                         $this-&gt;is_required        = $_POST['required'];
</span><span class="cx">                         $this-&gt;type                        = $_POST['fieldtype'];
</span><span class="cx">                         $this-&gt;order_by                = $_POST[&quot;sort_order_{$this-&gt;type}&quot;];
</span><span class="lines">@@ -554,7 +554,7 @@
</span><span class="cx">                                 &lt;div id=&quot;titlediv&quot; class=&quot;inside&quot;&gt;
</span><span class="cx">                                         &lt;h3&gt;&lt;label for=&quot;description&quot;&gt;&lt;?php _e(&quot;Field Description&quot;, 'buddypress') ?&gt;&lt;/label&gt;&lt;/h3&gt;
</span><span class="cx">                                         &lt;div id=&quot;titlewrap&quot;&gt;
</span><del>-                                                &lt;textarea name=&quot;description&quot; id=&quot;description&quot; rows=&quot;8&quot; cols=&quot;60&quot;&gt;&lt;?php echo htmlspecialchars( $this-&gt;desc ); ?&gt;&lt;/textarea&gt;
</del><ins>+                                                &lt;textarea name=&quot;description&quot; id=&quot;description&quot; rows=&quot;8&quot; cols=&quot;60&quot;&gt;&lt;?php echo htmlspecialchars( $this-&gt;description ); ?&gt;&lt;/textarea&gt;
</ins><span class="cx">                                         &lt;/div&gt;
</span><span class="cx">                                 &lt;/div&gt;
</span><span class="cx">         
</span></span></pre></div>
<a id="branches11bpxprofilebpxprofiletemplatetagsphp"></a>
<div class="modfile"><h4>Modified: branches/1.1/bp-xprofile/bp-xprofile-templatetags.php (2074 => 2075)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.1/bp-xprofile/bp-xprofile-templatetags.php        2009-11-02 17:58:02 UTC (rev 2074)
+++ branches/1.1/bp-xprofile/bp-xprofile-templatetags.php        2009-11-02 18:26:55 UTC (rev 2075)
</span><span class="lines">@@ -368,7 +368,7 @@
</span><span class="cx">         function bp_get_the_profile_field_description() {
</span><span class="cx">                 global $field;
</span><span class="cx">                 
</span><del>-                return apply_filters( 'bp_get_the_profile_field_description', $field-&gt;desc );
</del><ins>+                return apply_filters( 'bp_get_the_profile_field_description', $field-&gt;description );
</ins><span class="cx">         }
</span><span class="cx">         
</span><span class="cx"> function bp_the_profile_field_input_name() {
</span></span></pre>
</div>
</div>

</body>
</html>