Changeset 1904
- Timestamp:
- 09/21/2009 04:49:17 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
bp-core.php (modified) (2 diffs)
-
bp-groups.php (modified) (1 diff)
-
bp-groups/bp-groups-classes.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r1896 r1904 623 623 624 624 if ( $bp->current_component == $slug && !$bp->current_action ) { 625 if ( function_exists( $screen_function ) ) 626 add_action( 'wp', $function, 3 ); 625 if ( !is_object( $screen_function[0] ) ) 626 add_action( 'wp', $screen_function, 3 ); 627 else 628 add_action( 'wp', array( &$screen_function[0], $screen_function[1] ), 3 ); 627 629 628 630 if ( $default_subnav_slug ) … … 726 728 727 729 if ( ( $bp->current_action == $slug && $bp->current_component == $parent_slug ) && $user_has_access ) { 728 if ( !is_object( $screen_function[0]) )730 if ( !is_object( $screen_function[0] ) ) 729 731 add_action( 'wp', $screen_function, 3 ); 730 732 else -
trunk/bp-groups.php
r1891 r1904 1842 1842 } 1843 1843 1844 function groups_get_user_groups( $pag_num, $pag_page ) { 1845 global $bp; 1846 1847 $groups = BP_Groups_Member::get_group_ids( $bp->displayed_user->id, $pag_num, $pag_page ); 1848 1849 return array( 'groups' => $groups['ids'], 'total' => $groups['total'] ); 1844 function groups_get_user_groups( $user_id = false, $pag_num = false, $pag_page = false ) { 1845 global $bp; 1846 1847 if ( !$user_id ) 1848 $user_id = $bp->displayed_user->id; 1849 1850 return BP_Groups_Member::get_group_ids( $user_id, $pag_num, $pag_page ); 1850 1851 } 1851 1852 -
trunk/bp-groups/bp-groups-classes.php
r1858 r1904 253 253 254 254 // Get all the group ids for the current user's groups. 255 $gids = BP_Groups_Member::get_group_ids( $user_id , false, false, false, true);256 255 $gids = BP_Groups_Member::get_group_ids( $user_id ); 256 257 257 if ( !$gids['groups'] ) 258 258 return false; … … 621 621 } 622 622 623 function get_group_ids( $user_id, $limit = false, $page = false , $get_total = true, $as_col = false) {623 function get_group_ids( $user_id, $limit = false, $page = false ) { 624 624 global $wpdb, $bp; 625 625 … … 636 636 } 637 637 638 if ( $as_col ) 639 $paged_groups = $wpdb->get_col( $group_sql ); 640 else 641 $paged_groups = $wpdb->get_results( $group_sql ); 642 643 return array( 'groups' => $paged_groups, 'total' => $total_groups ); 638 $groups = $wpdb->get_col( $group_sql ); 639 640 return array( 'groups' => $groups, 'total' => (int) $total_groups ); 644 641 } 645 642
Note: See TracChangeset
for help on using the changeset viewer.