Changeset 3555
- Timestamp:
- 12/22/2010 01:13:29 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-classes.php
r3542 r3555 507 507 global $wpdb, $bp; 508 508 509 if ( $secondary_item_id ) 510 $secondary_item_sql = $wpdb->prepare( " AND secondary_item_id = %d", $secondary_item_id ); 509 $secondary_item_sql = !empty( $secondary_item_id ) ? $wpdb->prepare( " AND secondary_item_id = %d", $secondary_item_id ) : ''; 511 510 512 511 return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->core->table_name_notifications} WHERE user_id = %d AND item_id = %d AND component_name = %s AND component_action = %s{$secondary_item_sql}", $user_id, $item_id, $component_name, $component_action ) ); -
trunk/bp-groups.php
r3554 r3555 536 536 537 537 if ( $bp->is_single_item ) { 538 if ( isset($bp->action_variables) && 'send' == $bp->action_variables[0] ) {538 if ( !empty( $bp->action_variables[0] ) && 'send' == $bp->action_variables[0] ) { 539 539 540 540 if ( !check_admin_referer( 'groups_send_invites', '_wpnonce_send_invites' ) ) … … 1421 1421 1422 1422 $group = new BP_Groups_Group( $group_id ); 1423 $user_url = bp_core_get_user_domain( $ user_id );1423 $user_url = bp_core_get_user_domain( $bp->loggedin_user->id ); 1424 1424 1425 1425 if ( (int)$total_items > 1 ) -
trunk/bp-groups/bp-groups-classes.php
r3542 r3555 866 866 global $wpdb, $bp; 867 867 868 if ( $limit && $page ) 869 $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 868 $pag_sql = ( !empty( $limit ) && !empty( $page ) ) ? $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ) : ''; 870 869 871 if ( $exclude ) 872 $exclude_sql = $wpdb->prepare( " AND g.id NOT IN (%s)", $exclude ); 870 $exclude_sql = !empty( $exclude ) ? $wpdb->prepare( " AND g.id NOT IN (%s)", $exclude ) : ''; 873 871 874 872 $paged_groups = $wpdb->get_results( $wpdb->prepare( "SELECT g.*, gm1.meta_value as total_member_count, gm2.meta_value as last_activity FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE g.id = m.group_id AND g.id = gm1.group_id AND g.id = gm2.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' AND m.is_confirmed = 0 AND m.inviter_id != 0 AND m.invite_sent = 1 AND m.user_id = %d {$exclude_sql} ORDER BY m.date_modified ASC {$pag_sql}", $user_id ) ); -
trunk/bp-groups/bp-groups-templatetags.php
r3543 r3555 1847 1847 1848 1848 if ( !$group_id ) 1849 $group_id = ( $bp->groups->new_group_id ) ? $bp->groups->new_group_id : $bp->groups->current_group->id;1849 $group_id = !empty( $bp->groups->new_group_id ) ? $bp->groups->new_group_id : $bp->groups->current_group->id; 1850 1850 1851 1851 $friends = friends_get_friends_invite_list( $bp->loggedin_user->id, $group_id ); … … 1855 1855 1856 1856 for ( $i = 0; $i < count( $friends ); $i++ ) { 1857 if ( $invites ) { 1858 if ( in_array( $friends[$i]['id'], $invites ) ) { 1857 $checked = ''; 1858 1859 if ( !empty( $invites ) ) { 1860 if ( in_array( $friends[$i]['id'], $invites ) ) 1859 1861 $checked = ' checked="checked"'; 1860 } else {1861 $checked = '';1862 }1863 1862 } 1864 1863 … … 2220 2219 2221 2220 function the_invite() { 2222 global $invite ;2221 global $invite, $group_id; 2223 2222 2224 2223 $this->in_the_loop = true; … … 2247 2246 if ( !$group_id ) { 2248 2247 /* Backwards compatibility */ 2249 if ( $bp->groups->current_group ) $group_id = $bp->groups->current_group->id; 2250 if ( $bp->groups->new_group_id ) $group_id = $bp->groups->new_group_id; 2248 if ( !empty( $bp->groups->current_group ) ) 2249 $group_id = $bp->groups->current_group->id; 2250 if ( !empty( $bp->groups->new_group_id ) ) 2251 $group_id = $bp->groups->new_group_id; 2251 2252 } 2252 2253
Note: See TracChangeset
for help on using the changeset viewer.