Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/25/2013 02:28:28 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Fix some PHP 5.4 static method E_STRICT warnings across several components. More to do here. See #5108.

File:
1 edited

Legend:

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

    r7298 r7308  
    626626     * @var integer
    627627     */
    628     var $id;
     628    public $id;
    629629
    630630    /**
     
    633633     * @var string
    634634     */
    635     var $avatar;
     635    public $avatar;
    636636
    637637    /**
     
    640640     * @var string
    641641     */
    642     var $avatar_thumb;
     642    public $avatar_thumb;
    643643
    644644    /**
     
    647647     * @var string
    648648     */
    649     var $avatar_mini;
     649    public $avatar_mini;
    650650
    651651    /**
     
    654654     * @var string
    655655     */
    656     var $fullname;
     656    public $fullname;
    657657
    658658    /**
     
    661661     * @var string
    662662     */
    663     var $email;
     663    public $email;
    664664
    665665    /**
     
    668668     * @var string
    669669     */
    670     var $user_url;
     670    public $user_url;
    671671
    672672    /**
     
    675675     * @var string
    676676     */
    677     var $user_link;
     677    public $user_link;
    678678
    679679    /**
     
    684684     * @var string
    685685     */
    686     var $last_active;
     686    public $last_active;
    687687
    688688    /* Extras */
     
    693693     * @var integer
    694694     */
    695     var $total_friends;
     695    public $total_friends;
    696696
    697697    /**
     
    701701     * @deprecated No longer used
    702702     */
    703     var $total_blogs;
     703    public $total_blogs;
    704704
    705705    /**
     
    710710     * @var string
    711711     */
    712     var $total_groups;
     712    public $total_groups;
    713713
    714714    /**
     
    728728     * @param boolean $populate_extras Whether to fetch extra information such as group/friendship counts or not.
    729729     */
    730     function __construct( $user_id, $populate_extras = false ) {
     730    public function __construct( $user_id, $populate_extras = false ) {
    731731        if ( !empty( $user_id ) ) {
    732732            $this->id = $user_id;
     
    751751     * @uses bp_profile_last_updated_date() Returns the last updated date for a user.
    752752     */
    753     function populate() {
     753    private function populate() {
    754754
    755755        if ( bp_is_active( 'xprofile' ) )
     
    784784     * Populates extra fields such as group and friendship counts.
    785785     */
    786     function populate_extras() {
     786    private function populate_extras() {
    787787
    788788        if ( bp_is_active( 'friends' ) ) {
     
    796796    }
    797797
    798     function get_profile_data() {
     798    private function get_profile_data() {
    799799        return BP_XProfile_ProfileData::get_all_for_user( $this->id );
    800800    }
     
    802802    /** Static Methods ********************************************************/
    803803
    804     function get_users( $type, $limit = 0, $page = 1, $user_id = 0, $include = false, $search_terms = false, $populate_extras = true, $exclude = false, $meta_key = false, $meta_value = false ) {
     804    public static function get_users( $type, $limit = 0, $page = 1, $user_id = 0, $include = false, $search_terms = false, $populate_extras = true, $exclude = false, $meta_key = false, $meta_value = false ) {
    805805        global $wpdb, $bp;
    806806
     
    989989     * @static
    990990     */
    991     function get_users_by_letter( $letter, $limit = null, $page = 1, $populate_extras = true, $exclude = '' ) {
     991    public static function get_users_by_letter( $letter, $limit = null, $page = 1, $populate_extras = true, $exclude = '' ) {
    992992        global $bp, $wpdb;
    993993
     
    10541054     * @static
    10551055     */
    1056     function get_specific_users( $user_ids, $limit = null, $page = 1, $populate_extras = true ) {
     1056    public static function get_specific_users( $user_ids, $limit = null, $page = 1, $populate_extras = true ) {
    10571057        global $wpdb;
    10581058
     
    10981098     * @static
    10991099     */
    1100     function search_users( $search_terms, $limit = null, $page = 1, $populate_extras = true ) {
     1100    public static function search_users( $search_terms, $limit = null, $page = 1, $populate_extras = true ) {
    11011101        global $bp, $wpdb;
    11021102
     
    11401140     * @static
    11411141     */
    1142     function get_user_extras( &$paged_users, &$user_ids, $type = false ) {
     1142    public static function get_user_extras( &$paged_users, &$user_ids, $type = false ) {
    11431143        global $bp, $wpdb;
    11441144
     
    12231223     * @static
    12241224     */
    1225     function get_core_userdata( $user_id ) {
     1225    public static function get_core_userdata( $user_id ) {
    12261226        global $wpdb;
    12271227
     
    12481248     * @var integer
    12491249     */
    1250     var $id;
     1250    public $id;
    12511251
    12521252    /**
     
    12551255     * @var integer
    12561256     */
    1257     var $item_id;
     1257    public $item_id;
    12581258
    12591259    /**
     
    12621262     * @var integer
    12631263     */
    1264     var $secondary_item_id = null;
     1264    public $secondary_item_id = null;
    12651265
    12661266    /**
     
    12691269     * @var integer
    12701270     */
    1271     var $user_id;
     1271    public $user_id;
    12721272
    12731273    /**
     
    12761276     * @var string
    12771277     */
    1278     var $component_name;
     1278    public $component_name;
    12791279
    12801280    /**
     
    12831283     * @var string
    12841284     */
    1285     var $component_action;
     1285    public $component_action;
    12861286
    12871287    /**
     
    12901290     * @var string
    12911291     */
    1292     var $date_notified;
     1292    public $date_notified;
    12931293
    12941294    /**
     
    12971297     * @var boolean
    12981298     */
    1299     var $is_new;
     1299    public $is_new;
    13001300
    13011301    /** Public Methods ********************************************************/
     
    13061306     * @param integer $id
    13071307     */
    1308     function __construct( $id = 0 ) {
     1308    public function __construct( $id = 0 ) {
    13091309        if ( !empty( $id ) ) {
    13101310            $this->id = $id;
     
    13201320     * @return bool Success or failure
    13211321     */
    1322     function save() {
     1322    public function save() {
    13231323        global $bp, $wpdb;
    13241324
     
    13481348     * @global wpdb $wpdb WordPress database object
    13491349     */
    1350     function populate() {
     1350    private function populate() {
    13511351        global $bp, $wpdb;
    13521352
     
    13641364    /** Static Methods ********************************************************/
    13651365
    1366     function check_access( $user_id, $notification_id ) {
     1366    public static function check_access( $user_id, $notification_id ) {
    13671367        global $wpdb, $bp;
    13681368
     
    13801380     * @static
    13811381     */
    1382     function get_all_for_user( $user_id, $status = 'is_new' ) {
     1382    public static function get_all_for_user( $user_id, $status = 'is_new' ) {
    13831383        global $bp, $wpdb;
    13841384
     
    13981398     * @static
    13991399     */
    1400     function delete_for_user_by_type( $user_id, $component_name, $component_action ) {
     1400    public static function delete_for_user_by_type( $user_id, $component_name, $component_action ) {
    14011401        global $bp, $wpdb;
    14021402
     
    14161416     * @static
    14171417     */
    1418     function delete_for_user_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) {
     1418    public static function delete_for_user_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) {
    14191419        global $bp, $wpdb;
    14201420
     
    14341434     * @static
    14351435     */
    1436     function delete_from_user_by_type( $user_id, $component_name, $component_action ) {
     1436    public static function delete_from_user_by_type( $user_id, $component_name, $component_action ) {
    14371437        global $bp, $wpdb;
    14381438
     
    14511451     * @static
    14521452     */
    1453     function delete_all_by_type( $item_id, $component_name, $component_action, $secondary_item_id ) {
     1453    public static function delete_all_by_type( $item_id, $component_name, $component_action, $secondary_item_id ) {
    14541454        global $bp, $wpdb;
    14551455
     
    17131713     * @global unknown $wp_embed
    17141714     */
    1715     function __construct() {
     1715    public function __construct() {
    17161716        global $wp_embed;
    17171717
     
    17621762     * @return string The embed HTML on success, otherwise the original URL.
    17631763     */
    1764     function shortcode( $attr, $url = '' ) {
     1764    public function shortcode( $attr, $url = '' ) {
    17651765        if ( empty( $url ) )
    17661766            return '';
     
    18271827     * @return string The embed HTML on success, otherwise the original URL.
    18281828     */
    1829     function parse_oembed( $id, $url, $attr, $rawattr ) {
     1829    public function parse_oembed( $id, $url, $attr, $rawattr ) {
    18301830        $id = intval( $id );
    18311831
     
    18951895     * @since BuddyPress (1.7)
    18961896     */
    1897     function walk( $elements, $max_depth ) {
     1897    public function walk( $elements, $max_depth ) {
    18981898        $args   = array_slice( func_get_args(), 2 );
    18991899        $output = '';
     
    19821982     * @since BuddyPress (1.7)
    19831983     */
    1984     function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
     1984    public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
    19851985        // If we're someway down the tree, indent the HTML with the appropriate number of tabs
    19861986        $indent = $depth ? str_repeat( "\t", $depth ) : '';
Note: See TracChangeset for help on using the changeset viewer.