Changeset 4059
- Timestamp:
- 02/21/2011 02:10:23 PM (16 years ago)
- Location:
- trunk/bp-xprofile
- Files:
-
- 2 edited
-
bp-xprofile-admin.php (modified) (2 diffs)
-
bp-xprofile-classes.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-admin.php
r3989 r4059 173 173 if ( BP_XProfile_Group::admin_validate( $_POST ) ) { 174 174 $group->name = wp_filter_kses( $_POST['group_name'] ); 175 $group->description = wp_filter_kses( $_POST['group_description'] );175 $group->description = !empty( $_POST['group_description'] ) ? wp_filter_kses( $_POST['group_description'] ) : ''; 176 176 177 177 if ( !$group->save() ) { … … 237 237 if ( BP_XProfile_Field::admin_validate() ) { 238 238 $field->name = wp_filter_kses( $_POST['title'] ); 239 $field->description = wp_filter_kses( $_POST['description'] );239 $field->description = !empty( $_POST['description'] ) ? wp_filter_kses( $_POST['description'] ) : ''; 240 240 $field->is_required = wp_filter_kses( $_POST['required'] ); 241 241 $field->type = wp_filter_kses( $_POST['fieldtype'] ); -
trunk/bp-xprofile/bp-xprofile-classes.php
r4041 r4059 45 45 $sql = $wpdb->prepare( "INSERT INTO {$bp->profile->table_name_groups} (name, description, can_delete) VALUES (%s, %s, 1)", $this->name, $this->description ); 46 46 47 if ( !$wpdb->query( $sql) )47 if ( is_wp_error( $wpdb->query( $sql ) ) ) 48 48 return false; 49 49
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)