Changeset 2547
- Timestamp:
- 02/02/2010 09:42:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity.php
r2542 r2547 562 562 extract( $r, EXTR_SKIP ); 563 563 564 if ( empty( $content ) )564 if ( empty( $content ) || !strlen( trim( $content ) ) ) 565 565 return false; 566 566 -
trunk/bp-forums.php
r2533 r2547 443 443 $post_position = $post->post_position; 444 444 445 $post = bb_insert_post( array( 'post_id' => $post_id, 'topic_id' => $topic_id, 'post_text' => stripslashes( $post_text), 'post_time' => $post_time, 'poster_id' => $poster_id, 'poster_ip' => $poster_ip, 'post_status' => $post_status, 'post_position' => $post_position ) );445 $post = bb_insert_post( array( 'post_id' => $post_id, 'topic_id' => $topic_id, 'post_text' => stripslashes( trim( $post_text ) ), 'post_time' => $post_time, 'poster_id' => $poster_id, 'poster_ip' => $poster_ip, 'post_status' => $post_status, 'post_position' => $post_position ) ); 446 446 447 447 if ( $post ) -
trunk/bp-groups.php
r2538 r2547 1052 1052 1053 1053 if ( 'group-details' == $bp->groups->current_create_step ) { 1054 if ( empty( $_POST['group-name'] ) || empty( $_POST['group-desc'] ) ) {1054 if ( empty( $_POST['group-name'] ) || empty( $_POST['group-desc'] ) || !strlen( trim( $_POST['group-name'] ) ) || !strlen( trim( $_POST['group-desc'] ) ) ) { 1055 1055 bp_core_add_message( __( 'Please fill in all of the required fields', 'buddypress' ), 'error' ); 1056 1056 bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/create/step/' . $bp->groups->current_create_step . '/' ); … … 1856 1856 extract( $r, EXTR_SKIP ); 1857 1857 1858 if ( empty($content) || empty($user_id) || empty($group_id) )1858 if ( empty($content) || !strlen( trim( $content ) ) || empty($user_id) || empty($group_id) ) 1859 1859 return false; 1860 1860 -
trunk/bp-xprofile.php
r2493 r2547 719 719 return false; 720 720 721 if ( empty( $value ) || !strlen( trim( $value ) ) ) 722 return false; 723 721 724 $field = new BP_XProfile_ProfileData(); 722 725 $field->field_id = $field_id; -
trunk/bp-xprofile/bp-xprofile-classes.php
r2439 r2547 728 728 729 729 if ( $this->is_valid_field() ) { 730 if ( $this->exists() && $this->value != '') {730 if ( $this->exists() && !empty( $this->value ) && strlen( trim( $this->value ) ) ) { 731 731 $result = $wpdb->query( $wpdb->prepare( "UPDATE {$bp->profile->table_name_data} SET value = %s, last_updated = %s WHERE user_id = %d AND field_id = %d", $this->value, $this->last_updated, $this->user_id, $this->field_id ) ); 732 732 } else if ( $this->exists() && empty( $this->value ) ) {
Note: See TracChangeset
for help on using the changeset viewer.