Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/10/2011 06:32:02 AM (14 years ago)
Author:
djpaul
Message:

Tidy up whitespace. Fixes #3466, props cnorris23

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-classes.php

    r4920 r4961  
    168168            if ( !empty( $field_ids ) )
    169169                $field_data = $wpdb->get_results( $wpdb->prepare( "SELECT field_id, value FROM {$bp->profile->table_name_data} WHERE field_id IN ( {$field_ids_sql} ) AND user_id = %d", $user_id ) );
    170                
     170
    171171            // Remove data-less fields, if necessary
    172172            if ( $hide_empty_fields ) {
    173            
     173
    174174                // Loop through the results and find the fields that have data.
    175175                foreach( (array)$field_data as $data ) {
     
    179179                    }
    180180                }
    181                
     181
    182182                // The remaining members of $field_ids are empty. Remove them.
    183183                foreach( $fields as $field_key => $field ) {
     
    186186                    }
    187187                }
    188                
     188
    189189                // Reset indexes
    190190                $fields = array_values( $fields );
    191                
    192             }
    193            
     191
     192            }
     193
    194194            // Field data was found
    195195            if ( !empty( $field_data ) && !is_wp_error( $field_data ) ) {
    196                
     196
    197197                // Loop through fields
    198198                foreach( (array)$fields as $field_key => $field ) {
    199                    
     199
    200200                    // Loop throught the data in each field
    201201                    foreach( (array)$field_data as $data ) {
    202                    
     202
    203203                        // Assign correct data value to the field
    204204                        if ( $field->id == $data->field_id )
    205205                            $fields[$field_key]->data->value = $data->value;
    206                     }   
    207                 }   
     206                    }
     207                }
    208208            }
    209209        }
     
    215215                    $groups[$group_key]->fields[] = $field;
    216216            }
    217            
     217
    218218            // When we unset fields above, we may have created empty groups.
    219219            // Remove them, if necessary.
     
    221221                unset( $groups[$group_key] );
    222222            }
    223            
     223
    224224            // Reset indexes
    225225            $groups = array_values( $groups );
     
    328328    var $message = null;
    329329    var $message_type = 'err';
    330    
     330
    331331    function bp_xprofile_field( $id = null, $user_id = null, $get_data = true ) {
    332332        $this->__construct( $id, $user_id, $get_data );
    333333    }
    334    
     334
    335335    function __construct( $id = null, $user_id = null, $get_data = true ) {
    336336        if ( $id )
     
    794794    var $value;
    795795    var $last_updated;
    796    
     796
    797797    function bp_xprofile_profiledata( $field_id = null, $user_id = null ) {
    798         $this->__construct( $field_id, $user_id );     
    799     }
    800    
     798        $this->__construct( $field_id, $user_id );
     799    }
     800
    801801    function __construct( $field_id = null, $user_id = null ) {
    802802        if ( $field_id )
Note: See TracChangeset for help on using the changeset viewer.