Skip to:
Content

BuddyPress.org

Changeset 4216


Ignore:
Timestamp:
04/19/2011 07:28:07 PM (15 years ago)
Author:
djpaul
Message:

Add PHP5-style constructors to more classes. Fixes #3148 again, props Backie

Location:
trunk
Files:
3 edited

Legend:

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

    r4108 r4216  
    8181
    8282        function bp_activity_template( $page, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments, $show_hidden, $exclude, $in ) {
     83                $this->__construct( $page, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments, $show_hidden, $exclude, $in );
     84        }
     85
     86        function __construct( $page, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments, $show_hidden, $exclude, $in ) {
    8387                global $bp;
    8488
  • trunk/bp-groups/bp-groups-template.php

    r4137 r4216  
    7272
    7373        function bp_groups_template( $user_id, $type, $page, $per_page, $max, $slug, $search_terms, $include, $populate_extras, $exclude, $show_hidden ) {
     74                $this->__construct( $user_id, $type, $page, $per_page, $max, $slug, $search_terms, $include, $populate_extras, $exclude, $show_hidden );
     75        }
     76
     77        function __construct( $user_id, $type, $page, $per_page, $max, $slug, $search_terms, $include, $populate_extras, $exclude, $show_hidden ){
     78
    7479                global $bp;
    7580
     
    14481453
    14491454        function bp_groups_group_members_template( $group_id, $per_page, $max, $exclude_admins_mods, $exclude_banned, $exclude ) {
     1455                $this->__construct( $group_id, $per_page, $max, $exclude_admins_mods, $exclude_banned, $exclude );     
     1456        }
     1457       
     1458        function __construct( $group_id, $per_page, $max, $exclude_admins_mods, $exclude_banned, $exclude ) {
    14501459                global $bp;
    14511460
     
    21342143
    21352144        function bp_groups_membership_requests_template( $group_id, $per_page, $max ) {
     2145                $this->__construct( $group_id, $per_page, $max );
     2146        }
     2147       
     2148       
     2149        function __construct( $group_id, $per_page, $max ) {
     2150               
    21362151                global $bp;
    21372152
     
    23042319
    23052320        function bp_groups_invite_template( $user_id, $group_id ) {
     2321                $this->__construct( $user_id, $group_id );
     2322        }
     2323               
     2324        function __construct( $user_id, $group_id ) {
     2325
    23062326                global $bp;
    2307 
     2327               
    23082328                $this->invites = groups_get_invites_for_group( $user_id, $group_id );
    23092329                $this->invite_count = count( $this->invites );
     2330
    23102331        }
    23112332
  • trunk/bp-xprofile/bp-xprofile-classes.php

    r4097 r4216  
    1010
    1111        function bp_xprofile_group( $id = null ) {
     12                $this->__construct( $id );
     13        }
     14
     15        function __construct( $id = null ) {
    1216                global $bp, $wpdb;
    1317
     
    281285        var $message = null;
    282286        var $message_type = 'err';
    283 
     287       
    284288        function bp_xprofile_field( $id = null, $user_id = null, $get_data = true ) {
     289                $this->__construct( $id, $user_id, $get_data );
     290        }
     291       
     292        function __construct( $id = null, $user_id = null, $get_data = true ) {
    285293                if ( $id )
    286294                        $this->populate( $id, $user_id, $get_data );
     
    743751        var $value;
    744752        var $last_updated;
    745 
     753       
    746754        function bp_xprofile_profiledata( $field_id = null, $user_id = null ) {
     755                $this->__construct( $field_id, $user_id );             
     756        }
     757       
     758        function __construct( $field_id = null, $user_id = null ) {
    747759                if ( $field_id )
    748760                        $this->populate( $field_id, $user_id );
Note: See TracChangeset for help on using the changeset viewer.