Skip to:
Content

BuddyPress.org

Changeset 5391


Ignore:
Timestamp:
11/27/2011 04:52:05 PM (13 years ago)
Author:
boonebgorges
Message:

Cleanup pass-by-reference and whitespace in bp-xprofile-classes.php. Fixes #3723

File:
1 edited

Legend:

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

    r5301 r5391  
    4141        global $wpdb, $bp;
    4242
    43         $this->name         = apply_filters( 'xprofile_group_name_before_save',        $this->name,        $this->id );
    44         $this->description  = apply_filters( 'xprofile_group_description_before_save', $this->description, $this->id );
    45 
    46         do_action_ref_array( 'xprofile_group_before_save', array( &$this ) );
     43        $this->name        = apply_filters( 'xprofile_group_name_before_save',        $this->name,        $this->id );
     44        $this->description = apply_filters( 'xprofile_group_description_before_save', $this->description, $this->id );
     45
     46        do_action_ref_array( 'xprofile_group_before_save', array( $this ) );
    4747
    4848        if ( $this->id )
     
    5454            return false;
    5555
    56         do_action_ref_array( 'xprofile_group_after_save', array( &$this ) );
     56        do_action_ref_array( 'xprofile_group_after_save', array( $this ) );
    5757
    5858        if ( $this->id )
     
    398398        $error = false;
    399399
    400         $this->group_id     = apply_filters( 'xprofile_field_group_id_before_save',    $this->group_id,    $this->id );
    401         $this->parent_id    = apply_filters( 'xprofile_field_parent_id_before_save',   $this->parent_id,   $this->id );
    402         $this->type         = apply_filters( 'xprofile_field_type_before_save',        $this->type,        $this->id );
    403         $this->name         = apply_filters( 'xprofile_field_name_before_save',        $this->name,        $this->id );
    404         $this->description  = apply_filters( 'xprofile_field_description_before_save', $this->description, $this->id );
    405         $this->is_required  = apply_filters( 'xprofile_field_is_required_before_save', $this->is_required, $this->id );
    406         $this->order_by     = apply_filters( 'xprofile_field_order_by_before_save',    $this->order_by,    $this->id );
    407         $this->field_order  = apply_filters( 'xprofile_field_field_order_before_save', $this->field_order, $this->id );
    408 
    409         do_action_ref_array( 'xprofile_field_before_save', array( &$this ) );
     400        $this->group_id    = apply_filters( 'xprofile_field_group_id_before_save',    $this->group_id,    $this->id );
     401        $this->parent_id   = apply_filters( 'xprofile_field_parent_id_before_save',   $this->parent_id,   $this->id );
     402        $this->type    = apply_filters( 'xprofile_field_type_before_save',        $this->type,        $this->id );
     403        $this->name    = apply_filters( 'xprofile_field_name_before_save',        $this->name,        $this->id );
     404        $this->description = apply_filters( 'xprofile_field_description_before_save', $this->description, $this->id );
     405        $this->is_required = apply_filters( 'xprofile_field_is_required_before_save', $this->is_required, $this->id );
     406        $this->order_by    = apply_filters( 'xprofile_field_order_by_before_save',    $this->order_by,    $this->id );
     407        $this->field_order = apply_filters( 'xprofile_field_field_order_before_save', $this->field_order, $this->id );
     408
     409        do_action_ref_array( 'xprofile_field_before_save', array( $this ) );
    410410
    411411        if ( $this->id != null )
     
    497497            }
    498498
    499             do_action_ref_array( 'xprofile_field_after_save', array( &$this ) );
     499            do_action_ref_array( 'xprofile_field_after_save', array( $this ) );
    500500
    501501            return $field_id;
     
    749749                </div>
    750750
    751                 <?php do_action_ref_array( 'xprofile_field_additional_options', array( &$this ) ); ?>
     751                <?php do_action_ref_array( 'xprofile_field_additional_options', array( $this ) ); ?>
    752752
    753753                <?php $this->render_admin_form_children(); ?>
     
    846846        $retval = $wpdb->get_row( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_data} WHERE user_id = %d AND field_id = %d", $this->user_id, $this->field_id ) );
    847847
    848         return apply_filters_ref_array( 'xprofile_data_exists', array( (bool)$retval, &$this ) );
     848        return apply_filters_ref_array( 'xprofile_data_exists', array( (bool)$retval, $this ) );
    849849    }
    850850
     
    863863        $retval = $wpdb->get_row( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_fields} WHERE id = %d", $this->field_id ) );
    864864
    865         return apply_filters_ref_array( 'xprofile_data_is_valid_field', array( (bool)$retval, &$this ) );
     865        return apply_filters_ref_array( 'xprofile_data_is_valid_field', array( (bool)$retval, $this ) );
    866866    }
    867867
     
    874874        $this->last_updated = apply_filters( 'xprofile_data_last_updated_before_save', bp_core_current_time(), $this->id );
    875875
    876         do_action_ref_array( 'xprofile_data_before_save', array( &$this ) );
     876        do_action_ref_array( 'xprofile_data_before_save', array( $this ) );
    877877
    878878        if ( $this->is_valid_field() ) {
     
    892892                return false;
    893893
    894             do_action_ref_array( 'xprofile_data_after_save', array( &$this ) );
     894            do_action_ref_array( 'xprofile_data_after_save', array( $this ) );
    895895
    896896            return true;
Note: See TracChangeset for help on using the changeset viewer.