Changeset 3542
- Timestamp:
- 12/19/2010 02:00:55 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-classes.php
r3450 r3542 284 284 global $wpdb, $bp; 285 285 286 $pag_sql = ''; 286 287 if ( $limit && $page ) 287 288 $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); -
trunk/bp-forums/bp-forums-filters.php
r3474 r3542 101 101 global $bp; 102 102 103 if ( $bp->current_action == 'forum' && $bp->action_variables[0] == 'topic' ) {104 if ( bp_has_forum_topic_posts() ) {103 if ( $bp->current_action == 'forum' && !empty( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] ) 104 if ( bp_has_forum_topic_posts() ) 105 105 $title .= ' | ' . bp_get_the_topic_title(); 106 }107 }108 106 109 107 return $title; -
trunk/bp-friends.php
r3515 r3542 259 259 260 260 function friends_delete_activity( $args ) { 261 global $bp; 262 261 263 if ( function_exists('bp_activity_delete_by_item_id') ) { 262 264 extract( (array)$args ); -
trunk/bp-groups/bp-groups-classes.php
r3541 r3542 1006 1006 global $bp, $wpdb; 1007 1007 1008 $pag_sql = ''; 1008 1009 if ( $limit && $page ) 1009 1010 $pag_sql = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 1010 1011 1012 $exclude_admins_sql = ''; 1011 1013 if ( $exclude_admins_mods ) 1012 1014 $exclude_admins_sql = $wpdb->prepare( "AND is_admin = 0 AND is_mod = 0" ); 1013 1015 1016 $banned_sql = ''; 1014 1017 if ( $exclude_banned ) 1015 1018 $banned_sql = $wpdb->prepare( " AND is_banned = 0" ); 1016 1019 1020 $exclude_sql = ''; 1017 1021 if ( $exclude ) 1018 1022 $exclude_sql = $wpdb->prepare( " AND m.user_id NOT IN ({$exclude})" ); … … 1026 1030 return false; 1027 1031 1028 if ( !isset($pag_sql) )1029 $total_member_count = count( $members);1032 if ( empty( $pag_sql ) ) 1033 $total_member_count = count( $members ); 1030 1034 else 1031 1035 $total_member_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(user_id) FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_confirmed = 1 {$banned_sql} {$exclude_admins_sql} {$exclude_sql}", $group_id ) ); -
trunk/bp-groups/bp-groups-templatetags.php
r3541 r3542 1504 1504 global $members_template; 1505 1505 1506 if ( null === $members_template->member->is_friend)1506 if ( !isset( $members_template->member->is_friend ) ) 1507 1507 $friend_status = 'not_friends'; 1508 1508 else -
trunk/bp-messages/bp-messages-classes.php
r3520 r3542 81 81 global $wpdb, $bp; 82 82 83 $pag_sql = ''; 83 84 if ( $limit && $page ) 84 85 $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 85 86 87 $type_sql = ''; 86 88 if ( $type == 'unread' ) 87 89 $type_sql = $wpdb->prepare( " AND r.unread_count != 0 " ); 88 else 90 elseif ( $type == 'read' ) 89 91 $type_sql = $wpdb->prepare( " AND r.unread_count = 0 " ); 90 92 -
trunk/bp-xprofile/bp-xprofile-classes.php
r3509 r3542 116 116 $r = wp_parse_args( $args, $defaults ); 117 117 extract( $r, EXTR_SKIP ); 118 119 $group_id_sql = ''; 118 $where_sql = ''; 119 120 120 if ( $profile_group_id ) 121 121 $where_sql = $wpdb->prepare( 'WHERE g.id = %d', $profile_group_id ); 122 else 122 elseif ( $exclude_groups ) 123 123 $where_sql = $wpdb->prepare( "WHERE g.id NOT IN ({$exclude_groups})"); 124 124 … … 141 141 return $groups; 142 142 143 $exclude_fields_sql = ''; 143 144 if ( $exclude_fields ) 144 145 $exclude_fields_sql = $wpdb->prepare( "AND id NOT IN ({$exclude_fields})" );
Note: See TracChangeset
for help on using the changeset viewer.