<!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] [2066] trunk/bp-xprofile: Fixes #1221 props DJPaul</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>2066</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2009-11-01 01:12:02 +0000 (Sun, 01 Nov 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fixes #1221 props DJPaul</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpxprofilebpxprofileadminphp">trunk/bp-xprofile/bp-xprofile-admin.php</a></li>
<li><a href="#trunkbpxprofilebpxprofileclassesphp">trunk/bp-xprofile/bp-xprofile-classes.php</a></li>
<li><a href="#trunkbpxprofilebpxprofiletemplatetagsphp">trunk/bp-xprofile/bp-xprofile-templatetags.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpxprofilebpxprofileadminphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/bp-xprofile-admin.php (2065 => 2066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-admin.php        2009-11-01 01:05:01 UTC (rev 2065)
+++ trunk/bp-xprofile/bp-xprofile-admin.php        2009-11-01 01:12:02 UTC (rev 2066)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">                                                         
</span><span class="cx">                                                                         <tr id="field_<?php echo attribute_escape( $field->id ); ?>" class="sortable<?php if ( $class ) { echo ' ' . $class; } ?>">
</span><span class="cx">                                                                          <td width="10"><img src="<?php echo BP_PLUGIN_URL ?>/bp-xprofile/admin/images/move.gif" alt="<?php _e( 'Drag', 'buddypress' ) ?>" /></td>
</span><del>-                                                                                <td><span title="<?php echo $field->desc; ?>"><?php echo attribute_escape( $field->name ); ?> <?php if(!$field->can_delete) { ?> <?php _e( '(Core Field)', 'buddypress' ) ?><?php } ?></span></td>
</del><ins>+                                                                                <td><span title="<?php echo $field->description; ?>"><?php echo attribute_escape( $field->name ); ?> <?php if(!$field->can_delete) { ?> <?php _e( '(Core Field)', 'buddypress' ) ?><?php } ?></span></td>
</ins><span class="cx">                                                                          <td><?php echo attribute_escape( $field->type ); ?></td>
</span><span class="cx">                                                                          <td style="text-align:center;"><?php if ( $field->is_required ) { echo '<img src="' . BP_PLUGIN_URL . '/bp-xprofile/admin/images/tick.gif" alt="' . __( 'Yes', 'buddypress' ) . '" />'; } else { ?>--<?php } ?></td>
</span><span class="cx">                                                                          <td style="text-align:center;"><?php if ( !$field->can_delete ) { ?><strike><?php _e( 'Edit', 'buddypress' ) ?></strike><?php } else { ?><a class="edit" href="admin.php?page=bp-profile-setup&amp;group_id=<?php echo attribute_escape( $groups[$i]->id ); ?>&amp;field_id=<?php echo attribute_escape( $field->id ); ?>&amp;mode=edit_field"><?php _e( 'Edit', 'buddypress' ) ?></a><?php } ?></td>
</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->name = wp_filter_kses( $_POST['title'] );
</span><del>-                        $field->desc = wp_filter_kses( $_POST['description'] );
</del><ins>+                        $field->description = wp_filter_kses( $_POST['description'] );
</ins><span class="cx">                         $field->is_required = wp_filter_kses( $_POST['required'] );
</span><span class="cx">                         $field->type = wp_filter_kses( $_POST['fieldtype'] );
</span><span class="cx">                         $field->order_by = wp_filter_kses( $_POST["sort_order_{$field->type}"] );
</span></span></pre></div>
<a id="trunkbpxprofilebpxprofileclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/bp-xprofile-classes.php (2065 => 2066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-classes.php        2009-11-01 01:05:01 UTC (rev 2065)
+++ trunk/bp-xprofile/bp-xprofile-classes.php        2009-11-01 01:12:02 UTC (rev 2066)
</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">@@ -256,7 +256,7 @@
</span><span class="cx">                 $this->parent_id = apply_filters( 'xprofile_field_parent_id_before_save', $this->parent_id, $this->id );
</span><span class="cx">                 $this->type = apply_filters( 'xprofile_field_type_before_save', $this->type, $this->id );
</span><span class="cx">                 $this->name = apply_filters( 'xprofile_field_name_before_save', $this->name, $this->id );
</span><del>-                $this->desc = apply_filters( 'xprofile_field_description_before_save', $this->desc, $this->id );
</del><ins>+                $this->description = apply_filters( 'xprofile_field_description_before_save', $this->description, $this->id );
</ins><span class="cx">                 $this->is_required = apply_filters( 'xprofile_field_is_required_before_save', $this->is_required, $this->id );
</span><span class="cx">                 $this->order_by = apply_filters( 'xprofile_field_order_by_before_save', $this->order_by, $this->id );
</span><span class="cx">                 $this->field_order = apply_filters( 'xprofile_field_field_order_before_save', $this->field_order, $this->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->id != null )
</span><del>-                        $sql = $wpdb->prepare("UPDATE {$bp->profile->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", $this->group_id, $this->type, $this->name, $this->desc, $this->is_required, $this->order_by, $this->field_order, $this->id);
</del><ins>+                        $sql = $wpdb->prepare("UPDATE {$bp->profile->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", $this->group_id, $this->type, $this->name, $this->description, $this->is_required, $this->order_by, $this->field_order, $this->id);
</ins><span class="cx">                 else
</span><del>-                        $sql = $wpdb->prepare("INSERT INTO {$bp->profile->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 )", $this->group_id, $this->type, $this->name, $this->desc, $this->is_required, $this->order_by, $this->field_order );
</del><ins>+                        $sql = $wpdb->prepare("INSERT INTO {$bp->profile->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 )", $this->group_id, $this->type, $this->name, $this->description, $this->is_required, $this->order_by, $this->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 = "admin.php?page=bp-profile-setup&amp;group_id=" . $this->group_id . "&amp;mode=add_field";
</span><span class="cx">
</span><span class="cx">                         $this->name                        = $_POST['title'];
</span><del>-                        $this->desc                        = $_POST['description'];
</del><ins>+                        $this->description        = $_POST['description'];
</ins><span class="cx">                         $this->is_required        = $_POST['required'];
</span><span class="cx">                         $this->type                        = $_POST['fieldtype'];
</span><span class="cx">                         $this->order_by                = $_POST["sort_order_{$this->type}"];
</span><span class="lines">@@ -554,7 +554,7 @@
</span><span class="cx">                                 <div id="titlediv" class="inside">
</span><span class="cx">                                         <h3><label for="description"><?php _e("Field Description", 'buddypress') ?></label></h3>
</span><span class="cx">                                         <div id="titlewrap">
</span><del>-                                                <textarea name="description" id="description" rows="8" cols="60"><?php echo htmlspecialchars( $this->desc ); ?></textarea>
</del><ins>+                                                <textarea name="description" id="description" rows="8" cols="60"><?php echo htmlspecialchars( $this->description ); ?></textarea>
</ins><span class="cx">                                         </div>
</span><span class="cx">                                 </div>
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkbpxprofilebpxprofiletemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/bp-xprofile-templatetags.php (2065 => 2066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-templatetags.php        2009-11-01 01:05:01 UTC (rev 2065)
+++ trunk/bp-xprofile/bp-xprofile-templatetags.php        2009-11-01 01:12:02 UTC (rev 2066)
</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->desc );
</del><ins>+                return apply_filters( 'bp_get_the_profile_field_description', $field->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>