Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/24/2011 01:17:29 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Full by-ref audit of all components. Sacrifice E_DEPRECATED notices in PHP 5.3 for PHP4.x compatibility.

See r3893, r3892, r3891, r3873, r3871, r3867, r3865, r3864, r3863, r3854.

File:
1 edited

Legend:

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

    r3893 r3903  
    4848        global $wpdb, $bp, $current_user;
    4949
    50         do_action( 'bp_activity_before_save', $this );
    51 
    52         $this->id                = apply_filters( 'bp_activity_id_before_save',                $this->id,                $this );
    53         $this->item_id           = apply_filters( 'bp_activity_item_id_before_save',           $this->item_id,           $this );
    54         $this->secondary_item_id = apply_filters( 'bp_activity_secondary_item_id_before_save', $this->secondary_item_id, $this );
    55         $this->user_id           = apply_filters( 'bp_activity_user_id_before_save',           $this->user_id,           $this );
    56         $this->primary_link      = apply_filters( 'bp_activity_primary_link_before_save',      $this->primary_link,      $this );
    57         $this->component         = apply_filters( 'bp_activity_component_before_save',         $this->component,         $this );
    58         $this->type              = apply_filters( 'bp_activity_type_before_save',              $this->type,              $this );
    59         $this->action            = apply_filters( 'bp_activity_action_before_save',            $this->action,            $this );
    60         $this->content           = apply_filters( 'bp_activity_content_before_save',           $this->content,           $this );
    61         $this->date_recorded     = apply_filters( 'bp_activity_date_recorded_before_save',     $this->date_recorded,     $this );
    62         $this->hide_sitewide     = apply_filters( 'bp_activity_hide_sitewide_before_save',     $this->hide_sitewide,     $this );
    63         $this->mptt_left         = apply_filters( 'bp_activity_mptt_left_before_save',         $this->mptt_left,         $this );
    64         $this->mptt_right        = apply_filters( 'bp_activity_mptt_right_before_save',        $this->mptt_right,        $this );
     50        // Use this...
     51        do_action_ref_array( 'bp_activity_before_save', array( &$this ) );
     52
     53        // Not these.
     54        $this->id                = apply_filters_ref_array( 'bp_activity_id_before_save',                array( $this->id,                &$this ) );
     55        $this->item_id           = apply_filters_ref_array( 'bp_activity_item_id_before_save',           array( $this->item_id,           &$this ) );
     56        $this->secondary_item_id = apply_filters_ref_array( 'bp_activity_secondary_item_id_before_save', array( $this->secondary_item_id, &$this ) );
     57        $this->user_id           = apply_filters_ref_array( 'bp_activity_user_id_before_save',           array( $this->user_id,           &$this ) );
     58        $this->primary_link      = apply_filters_ref_array( 'bp_activity_primary_link_before_save',      array( $this->primary_link,      &$this ) );
     59        $this->component         = apply_filters_ref_array( 'bp_activity_component_before_save',         array( $this->component,         &$this ) );
     60        $this->type              = apply_filters_ref_array( 'bp_activity_type_before_save',              array( $this->type,              &$this ) );
     61        $this->action            = apply_filters_ref_array( 'bp_activity_action_before_save',            array( $this->action,            &$this ) );
     62        $this->content           = apply_filters_ref_array( 'bp_activity_content_before_save',           array( $this->content,           &$this ) );
     63        $this->date_recorded     = apply_filters_ref_array( 'bp_activity_date_recorded_before_save',     array( $this->date_recorded,     &$this ) );
     64        $this->hide_sitewide     = apply_filters_ref_array( 'bp_activity_hide_sitewide_before_save',     array( $this->hide_sitewide,     &$this ) );
     65        $this->mptt_left         = apply_filters_ref_array( 'bp_activity_mptt_left_before_save',         array( $this->mptt_left,         &$this ) );
     66        $this->mptt_right        = apply_filters_ref_array( 'bp_activity_mptt_right_before_save',        array( $this->mptt_right,        &$this ) );
    6567
    6668        if ( !$this->component || !$this->type )
     
    8284            $this->id = $wpdb->insert_id;
    8385
    84         do_action( 'bp_activity_after_save', $this );
     86        do_action_ref_array( 'bp_activity_after_save', array( &$this ) );
     87
    8588        return true;
    8689    }
Note: See TracChangeset for help on using the changeset viewer.