Changeset 6342 for trunk/bp-groups/bp-groups-classes.php
- Timestamp:
- 09/18/2012 06:03:00 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-classes.php
r6321 r6342 59 59 global $wpdb, $bp; 60 60 61 if ( $group = $wpdb->get_row( $wpdb->prepare( "SELECT g.* FROM {$bp->groups->table_name} g WHERE g.id = %d", $this->id ) ) ) { 61 if ( $group = $wpdb->get_row( $wpdb->prepare( "SELECT g.* FROM {$bp->groups->table_name} g WHERE g.id = %d", $this->id ) ) ) { 62 62 bp_groups_update_meta_cache( $this->id ); 63 63 64 64 $this->id = $group->id; 65 65 $this->creator_id = $group->creator_id; … … 73 73 $this->total_member_count = groups_get_groupmeta( $this->id, 'total_member_count' ); 74 74 $this->is_member = BP_Groups_Member::check_is_member( bp_loggedin_user_id(), $this->id ); 75 75 76 76 // If this is a private or hidden group, does the current user have access? 77 77 if ( 'private' == $this->status || 'hidden' == $this->status ) { … … 160 160 161 161 do_action_ref_array( 'groups_group_after_save', array( &$this ) ); 162 162 163 163 wp_cache_delete( 'bp_groups_group_' . $this->id, 'bp' ); 164 164 … … 451 451 $group_ids[] = $group->id; 452 452 } 453 453 454 454 // Populate some extra information instead of querying each time in the loop 455 455 if ( !empty( $populate_extras ) ) { … … 457 457 $paged_groups = BP_Groups_Group::get_group_extras( $paged_groups, $group_ids, $type ); 458 458 } 459 459 460 460 // Grab all groupmeta 461 461 bp_groups_update_meta_cache( $group_ids ); … … 858 858 return false; 859 859 } 860 860 861 861 $sql = $wpdb->prepare( "INSERT INTO {$bp->groups->table_name_members} ( user_id, group_id, inviter_id, is_admin, is_mod, is_banned, user_title, date_modified, is_confirmed, comments, invite_sent ) VALUES ( %d, %d, %d, %d, %d, %d, %s, %s, %d, %s, %d )", $this->user_id, $this->group_id, $this->inviter_id, $this->is_admin, $this->is_mod, $this->is_banned, $this->user_title, $this->date_modified, $this->is_confirmed, $this->comments, $this->invite_sent ); 862 862 } … … 1312 1312 var $name = false; 1313 1313 var $slug = false; 1314 1314 1315 1315 // The name/slug of the Group Admin tab for this extension 1316 1316 var $admin_name = ''; … … 1359 1359 function _register() { 1360 1360 global $bp; 1361 1361 1362 1362 // If admin/create names and slugs are not provided, they fall back on the main 1363 1363 // name and slug for the extension … … 1365 1365 $this->admin_name = $this->name; 1366 1366 } 1367 1367 1368 1368 if ( !$this->admin_slug ) { 1369 1369 $this->admin_slug = $this->slug; 1370 1370 } 1371 1371 1372 1372 if ( !$this->create_name ) { 1373 1373 $this->create_name = $this->name; 1374 1374 } 1375 1375 1376 1376 if ( !$this->create_slug ) { 1377 1377 $this->create_slug = $this->slug; … … 1479 1479 ' ), 11 ); 1480 1480 } 1481 1482 ?>
Note: See TracChangeset
for help on using the changeset viewer.