Skip to:
Content

Changeset 1157


Ignore:
Timestamp:
02/25/09 21:06:49 (5 years ago)
Author:
apeatling
Message:

Fixes bug with group pagination on recently active groups filter.

Location:
trunk/bp-groups
Files:
2 edited

Legend:

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

    r1084 r1157  
    696696        if ( bp_is_home() ) { 
    697697            $paged_groups = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT m.group_id FROM {$bp->groups->table_name_members} m LEFT JOIN {$bp->groups->table_name_groupmeta} gm ON m.group_id = gm.group_id WHERE gm.meta_key = 'last_activity' AND user_id = %d AND inviter_id = 0 AND is_banned = 0 ORDER BY gm.meta_value DESC {$pag_sql}", $user_id ) );   
    698             $total_groups = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT count(m.group_id) FROM {$bp->groups->table_name_members} m LEFT JOIN {$bp->groups->table_name_groupmeta} gm ON m.group_id = gm.group_id WHERE gm.meta_key = 'last_activity' AND user_id = %d AND inviter_id = 0 AND is_banned = 0 ORDER BY gm.meta_value DESC {$pag_sql}", $user_id ) ); 
     698            $total_groups = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT count(m.group_id) FROM {$bp->groups->table_name_members} m LEFT JOIN {$bp->groups->table_name_groupmeta} gm ON m.group_id = gm.group_id WHERE gm.meta_key = 'last_activity' AND user_id = %d AND inviter_id = 0 AND is_banned = 0 ORDER BY gm.meta_value DESC", $user_id ) ); 
    699699        } else { 
    700700            $paged_groups = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT m.group_id FROM {$bp->groups->table_name_members} m LEFT JOIN {$bp->groups->table_name_groupmeta} gm ON m.group_id = gm.group_id LEFT JOIN  {$bp->groups->table_name} g ON m.group_id = g.id WHERE gm.meta_key = 'last_activity' AND g.status != 'hidden' AND m.user_id = %d AND m.inviter_id = 0 AND m.is_banned = 0 ORDER BY gm.meta_value DESC {$pag_sql}", $user_id ) );    
  • trunk/bp-groups/bp-groups-filters.php

    r1154 r1157  
    2828add_filter( 'bp_group_name', 'wp_filter_kses', 1 ); 
    2929 
     30add_filter( 'bp_group_description', 'stripslashes' ); 
     31add_filter( 'bp_group_description_excerpt', 'stripslashes' ); 
     32add_filter( 'bp_group_news', 'stripslashes' ); 
     33add_filter( 'bp_group_name', 'stripslashes' ); 
     34 
    3035?> 
Note: See TracChangeset for help on using the changeset viewer.