Changeset 2120
- Timestamp:
- 11/25/2009 10:32:06 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
bp-blogs.php (modified) (1 diff)
-
bp-core/bp-core-avatars.php (modified) (3 diffs)
-
bp-friends.php (modified) (3 diffs)
-
bp-groups/bp-groups-classes.php (modified) (3 diffs)
-
bp-groups/bp-groups-notifications.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs.php
r2114 r2120 449 449 return false; 450 450 451 /* If this is a password protected post, don't record the comment */ 452 if ( !empty( $post->post_password ) ) 453 return false; 454 451 455 $recorded_comment = new BP_Blogs_Comment; 452 456 $recorded_comment->user_id = $user_id; -
trunk/bp-core/bp-core-avatars.php
r2114 r2120 78 78 } 79 79 80 if ( !$css_id ) 81 $css_id = $object . '-' . $item_id . '-avatar'; 80 /* Add an identifying class to each item */ 81 $class .= ' ' . $object . '-' . $item_id . '-avatar'; 82 83 if ( !empty($css_id) ) 84 $css_id = " id='{$css_id}'"; 82 85 83 86 if ( $width ) … … 113 116 114 117 if ( $avatar_url ) 115 return apply_filters( 'bp_core_fetch_avatar', "<img src='{$avatar_url}' alt='{$alt}' id='{$css_id}' class='{$class}'{$html_width}{$html_height} />", $params );118 return apply_filters( 'bp_core_fetch_avatar', "<img src='{$avatar_url}' alt='{$alt}' class='{$class}'{$css_id}{$html_width}{$html_height} />", $params ); 116 119 } 117 120 … … 138 141 $gravatar = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' ) . md5( $grav_email ) . '?d=' . $default_grav . '&s=' . $grav_size; 139 142 140 return apply_filters( 'bp_core_fetch_avatar', "<img src='{$gravatar}' alt='{$alt}' id='{$css_id}' class='{$class}'{$html_width}{$html_height} />", $params );143 return apply_filters( 'bp_core_fetch_avatar', "<img src='{$gravatar}' alt='{$alt}' class='{$class}'{$css_id}{$html_width}{$html_height} />", $params ); 141 144 142 145 } else { -
trunk/bp-friends.php
r2077 r2120 118 118 if ( isset($bp->action_variables) && 'accept' == $bp->action_variables[0] && is_numeric($bp->action_variables[1]) ) { 119 119 /* Check the nonce */ 120 if ( !check_admin_referer( 'friends_accept_friendship' ) ) 121 return false; 120 check_admin_referer( 'friends_accept_friendship' ); 122 121 123 122 if ( friends_accept_friendship( $bp->action_variables[1] ) ) { … … 130 129 } else if ( isset($bp->action_variables) && 'reject' == $bp->action_variables[0] && is_numeric($bp->action_variables[1]) ) { 131 130 /* Check the nonce */ 132 if ( !check_admin_referer( 'friends_reject_friendship' ) )133 return false; 131 check_admin_referer( 'friends_reject_friendship' ); 132 134 133 135 134 if ( friends_reject_friendship( $bp->action_variables[1] ) ) { … … 630 629 $friend_link = bp_core_get_userlink( $friendship->friend_user_id ); 631 630 632 $primary_link = apply_filters( 'friends_activity_friendship_accepted_primary_link', bp_core_get_user link( $friendship->initiator_user_id ), &$friendship );631 $primary_link = apply_filters( 'friends_activity_friendship_accepted_primary_link', bp_core_get_userurl( $friendship->initiator_user_id ), &$friendship ); 633 632 634 633 /* Record in activity streams for the initiator */ -
trunk/bp-groups/bp-groups-classes.php
r2114 r2120 422 422 global $wpdb, $bp; 423 423 424 // Default sql WHERE conditions are blank. TODO: generic handler function. 425 $where_sql = null; 426 $where_conditions = array(); 427 428 // Limit results to public status 424 429 if ( $only_public ) 425 $ public_sql = $wpdb->prepare( " ANDg.status = 'public'" );430 $where_conditions[] = $wpdb->prepare( "g.status = 'public'" ); 426 431 427 432 if ( !is_site_admin() ) 428 $hidden_sql = $wpdb->prepare( " AND g.status != 'hidden'"); 433 $where_conditions[] = $wpdb->prepare( "g.status != 'hidden'"); 434 435 // Build where sql statement if necessary 436 if ( !empty( $where_conditions ) ) 437 $where_sql = 'WHERE ' . join( ' AND ', $where_conditions ); 429 438 430 439 if ( $limit && $page ) … … 438 447 switch ( $sort_by ) { 439 448 default: 440 $sql = $wpdb->prepare( "SELECT * FROM {$bp->groups->table_name} g WHERE 1=1 {$public_sql} {$hidden_sql} {$order_sql} {$pag_sql}" );449 $sql = $wpdb->prepare( "SELECT * FROM {$bp->groups->table_name} g {$where_sql} {$order_sql} {$pag_sql}" ); 441 450 break; 442 451 case 'members': … … 448 457 } 449 458 } else { 450 $sql = $wpdb->prepare( "SELECT * FROM {$bp->groups->table_name} g {$ public_sql} {$hidden_sql} {$order_sql} {$pag_sql}" );459 $sql = $wpdb->prepare( "SELECT * FROM {$bp->groups->table_name} g {$where_sql} {$order_sql} {$pag_sql}" ); 451 460 } 452 461 -
trunk/bp-groups/bp-groups-notifications.php
r2077 r2120 239 239 $settings_link = bp_core_get_user_domain( $invited_user_id ) . 'settings/notifications/'; 240 240 $invited_link = bp_core_get_user_domain( $invited_user_id ); 241 $invites_link = $invited_link . '/' .$bp->groups->slug . '/invites';241 $invites_link = $invited_link . $bp->groups->slug . '/invites'; 242 242 243 243 // Set up and send the message
Note: See TracChangeset
for help on using the changeset viewer.