WordPress.org

Plugin Directory

Changeset 636942


Ignore:
Timestamp:
12/11/12 10:00:10 (16 months ago)
Author:
johnjamesjacoby
Message:

BuddyPress:

  • Merge official 1.6 branch into 1.6.2 tag.
Location:
buddypress/tags/1.6.2
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • buddypress/tags/1.6.2/bp-activity/bp-activity-classes.php

    r634810 r636942  
    5757 
    5858    function save() { 
    59         global $wpdb, $bp, $current_user; 
     59        global $wpdb, $bp; 
    6060 
    6161        $this->id                = apply_filters_ref_array( 'bp_activity_id_before_save',                array( $this->id,                &$this ) ); 
     
    8484 
    8585        // If we have an existing ID, update the activity item, otherwise insert it. 
    86         if ( $this->id ) 
     86        if ( $this->id ) { 
    8787            $q = $wpdb->prepare( "UPDATE {$bp->activity->table_name} SET user_id = %d, component = %s, type = %s, action = %s, content = %s, primary_link = %s, date_recorded = %s, item_id = %d, secondary_item_id = %d, hide_sitewide = %d, is_spam = %d WHERE id = %d", $this->user_id, $this->component, $this->type, $this->action, $this->content, $this->primary_link, $this->date_recorded, $this->item_id, $this->secondary_item_id, $this->hide_sitewide, $this->is_spam, $this->id ); 
    88         else 
     88        } else { 
    8989            $q = $wpdb->prepare( "INSERT INTO {$bp->activity->table_name} ( user_id, component, type, action, content, primary_link, date_recorded, item_id, secondary_item_id, hide_sitewide, is_spam ) VALUES ( %d, %s, %s, %s, %s, %s, %s, %d, %d, %d, %d )", $this->user_id, $this->component, $this->type, $this->action, $this->content, $this->primary_link, $this->date_recorded, $this->item_id, $this->secondary_item_id, $this->hide_sitewide, $this->is_spam ); 
     90        } 
    9091 
    9192        if ( false === $wpdb->query( $q ) ) 
     
    9394 
    9495        // If this is a new activity item, set the $id property 
    95         if ( empty( $this->id ) ) 
     96        if ( empty( $this->id ) ) { 
    9697            $this->id = $wpdb->insert_id; 
    9798 
    9899        // If an existing activity item, prevent any changes to the content generating new @mention notifications. 
    99         else 
     100        } else { 
    100101            add_filter( 'bp_activity_at_name_do_notifications', '__return_false' ); 
     102        } 
    101103 
    102104        do_action_ref_array( 'bp_activity_after_save', array( &$this ) ); 
  • buddypress/tags/1.6.2/bp-core/bp-core-classes.php

    r634810 r636942  
    416416        $exclude_sql = ( !empty( $exclude ) ) ? " AND u.ID NOT IN ({$exclude})" : ""; 
    417417 
    418         $total_users_sql = apply_filters( 'bp_core_users_by_letter_count_sql', $wpdb->prepare( "SELECT COUNT(DISTINCT u.ID) FROM {$wpdb->users} u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE {$status_sql} AND pf.name = %s {$exclude_sql} AND pd.value LIKE '$letter%%'  ORDER BY pd.value ASC", bp_xprofile_fullname_field_name() ), $letter ); 
    419         $paged_users_sql = apply_filters( 'bp_core_users_by_letter_sql', $wpdb->prepare( "SELECT DISTINCT u.ID as id, u.user_registered, u.user_nicename, u.user_login, u.user_email FROM {$wpdb->users} u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE {$status_sql} AND pf.name = %s {$exclude_sql} AND pd.value LIKE '$letter%%' ORDER BY pd.value ASC{$pag_sql}", bp_xprofile_fullname_field_name() ), $letter, $pag_sql ); 
     418        $total_users_sql = apply_filters( 'bp_core_users_by_letter_count_sql', $wpdb->prepare( "SELECT COUNT(DISTINCT u.ID) FROM {$wpdb->users} u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE {$status_sql} AND pf.name = %s {$exclude_sql} AND pd.value LIKE '{$letter}%%'  ORDER BY pd.value ASC", bp_xprofile_fullname_field_name() ), $letter ); 
     419        $paged_users_sql = apply_filters( 'bp_core_users_by_letter_sql',       $wpdb->prepare( "SELECT DISTINCT u.ID as id, u.user_registered, u.user_nicename, u.user_login, u.user_email FROM {$wpdb->users} u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE {$status_sql} AND pf.name = %s {$exclude_sql} AND pd.value LIKE '{$letter}%%' ORDER BY pd.value ASC{$pag_sql}", bp_xprofile_fullname_field_name() ), $letter, $pag_sql ); 
    420420 
    421421        $total_users = $wpdb->get_var( $total_users_sql ); 
     
    508508        $status_sql   = bp_core_get_status_sql( 'u.' ); 
    509509 
    510         $total_users_sql = apply_filters( 'bp_core_search_users_count_sql', "SELECT COUNT(DISTINCT u.ID) as id FROM {$wpdb->users} u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE {$status_sql} AND pd.value LIKE '%%$search_terms%%' ORDER BY pd.value ASC", $search_terms ); 
    511         $paged_users_sql = apply_filters( 'bp_core_search_users_sql', "SELECT DISTINCT u.ID as id, u.user_registered, u.user_nicename, u.user_login, u.user_email FROM {$wpdb->users} u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE {$status_sql} AND pd.value LIKE '%%$search_terms%%' ORDER BY pd.value ASC{$pag_sql}", $search_terms, $pag_sql ); 
     510        $total_users_sql = apply_filters( 'bp_core_search_users_count_sql', "SELECT COUNT(DISTINCT u.ID) as id FROM {$wpdb->users} u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE {$status_sql} AND pd.value LIKE '%%{$search_terms}%%' ORDER BY pd.value ASC", $search_terms ); 
     511        $paged_users_sql = apply_filters( 'bp_core_search_users_sql',       "SELECT DISTINCT u.ID as id, u.user_registered, u.user_nicename, u.user_login, u.user_email FROM {$wpdb->users} u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE {$status_sql} AND pd.value LIKE '%%{$search_terms}%%' ORDER BY pd.value ASC{$pag_sql}", $search_terms, $pag_sql ); 
    512512 
    513513        $total_users = $wpdb->get_var( $total_users_sql ); 
     
    626626        global $wpdb; 
    627627 
    628         if ( !$user = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->users WHERE ID = %d LIMIT 1", $user_id ) ) ) 
     628        if ( !$user = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->users} WHERE ID = %d LIMIT 1", $user_id ) ) ) 
    629629            return false; 
    630630 
  • buddypress/tags/1.6.2/bp-core/bp-core-cssjs.php

    r634810 r636942  
    5555 
    5656    $width  = $image[0] / 2; 
    57     $height = $image[1] / 2; 
    58 ?> 
     57    $height = $image[1] / 2; ?> 
    5958 
    6059    <script type="text/javascript"> 
     
    8180                var rx = <?php echo $full_width; ?> / coords.w; 
    8281                var ry = <?php echo $full_height; ?> / coords.h; 
     82                <?php if ( $image ) : ?> 
     83                var w  = <?php echo $image[0]; ?>; 
     84                var h  = <?php echo $image[1]; ?>; 
     85                <?php endif; ?> 
    8386 
    8487                jQuery('#avatar-crop-preview').css({ 
    8588                <?php if ( $image ) : ?> 
    86                     width: Math.round(rx * <?php echo $image[0]; ?>) + 'px', 
    87                     height: Math.round(ry * <?php echo $image[1]; ?>) + 'px', 
     89                    width: Math.round(rx * w) + 'px', 
     90                    height: Math.round(ry * h) + 'px', 
    8891                <?php endif; ?> 
    8992                    marginLeft: '-' + Math.round(rx * coords.x) + 'px', 
     
    105108 */ 
    106109function bp_core_add_cropper_inline_css() { 
    107     global $bp; 
    108110?> 
    109111 
    110112    <style type="text/css"> 
    111113        .jcrop-holder { float: left; margin: 0 20px 20px 0; text-align: left; } 
    112         .jcrop-vline, .jcrop-hline { font-size: 0; position: absolute; background: white top left repeat url( <?php echo BP_PLUGIN_URL ?>/bp-core/images/Jcrop.gif ); } 
     114        .jcrop-vline, .jcrop-hline { font-size: 0; position: absolute; background: white top left repeat url('<?php echo BP_PLUGIN_URL ?>/bp-core/images/Jcrop.gif'); } 
    113115        .jcrop-vline { height: 100%; width: 1px !important; } 
    114116        .jcrop-hline { width: 100%; height: 1px !important; } 
  • buddypress/tags/1.6.2/bp-forums/bp-forums-filters.php

    r634810 r636942  
    156156 */ 
    157157function bp_forums_add_replied_distinct_sql( $sql ) { 
    158     global $wpdb; 
    159  
    160158    $sql = "DISTINCT t.topic_id, "; 
    161159 
     
    177175 */ 
    178176function bp_forums_add_replied_join_sql( $sql ) { 
    179     global $bbdb, $wpdb; 
     177    global $bbdb; 
    180178 
    181179    $sql .= " LEFT JOIN $bbdb->posts p ON p.topic_id = t.topic_id "; 
  • buddypress/tags/1.6.2/bp-forums/bp-forums-functions.php

    r634810 r636942  
    333333            $groups_where_sql = "t.topic_status = 0"; 
    334334        } 
    335         $count = $bbdb->get_results( $bbdb->prepare( "SELECT t.topic_id FROM {$bbdb->topics} AS t {$groups_table_sql} WHERE {$groups_where_sql}" ) ); 
     335        $count = $bbdb->get_results( "SELECT t.topic_id FROM {$bbdb->topics} AS t {$groups_table_sql} WHERE {$groups_where_sql}" ); 
    336336        $count = count( (array) $count ); 
    337337    } else { 
  • buddypress/tags/1.6.2/bp-friends/bp-friends-classes.php

    r634810 r636942  
    9292        } 
    9393 
    94         $friends = $wpdb->get_results( "SELECT friend_user_id, initiator_user_id FROM {$bp->friends->table_name} $friend_sql $oc_sql ORDER BY date_created DESC" ); 
     94        $friends = $wpdb->get_results( "SELECT friend_user_id, initiator_user_id FROM {$bp->friends->table_name} {$friend_sql} {$oc_sql} ORDER BY date_created DESC" ); 
    9595        $fids = array(); 
    9696 
     
    161161        // filter the user_ids based on the search criteria. 
    162162        if ( bp_is_active( 'xprofile' ) ) { 
    163             $sql = "SELECT DISTINCT user_id FROM {$bp->profile->table_name_data} WHERE user_id IN ($fids) AND value LIKE '$filter%%' {$pag_sql}"; 
    164             $total_sql = "SELECT COUNT(DISTINCT user_id) FROM {$bp->profile->table_name_data} WHERE user_id IN ($fids) AND value LIKE '$filter%%'"; 
    165         } else { 
    166             $sql = "SELECT DISTINCT user_id FROM {$wpdb->usermeta} WHERE user_id IN ($fids) AND meta_key = 'nickname' AND meta_value LIKE '$filter%%' {$pag_sql}"; 
    167             $total_sql = "SELECT COUNT(DISTINCT user_id) FROM {$wpdb->usermeta} WHERE user_id IN ($fids) AND meta_key = 'nickname' AND meta_value LIKE '$filter%%'"; 
     163            $sql = "SELECT DISTINCT user_id FROM {$bp->profile->table_name_data} WHERE user_id IN ({$fids}) AND value LIKE '{$filter}%%' {$pag_sql}"; 
     164            $total_sql = "SELECT COUNT(DISTINCT user_id) FROM {$bp->profile->table_name_data} WHERE user_id IN ({$fids}) AND value LIKE '{$filter}%%'"; 
     165        } else { 
     166            $sql = "SELECT DISTINCT user_id FROM {$wpdb->usermeta} WHERE user_id IN ({$fids}) AND meta_key = 'nickname' AND meta_value LIKE '{$filter}%%' {$pag_sql}"; 
     167            $total_sql = "SELECT COUNT(DISTINCT user_id) FROM {$wpdb->usermeta} WHERE user_id IN ({$fids}) AND meta_key = 'nickname' AND meta_value LIKE '{$filter}%%'"; 
    168168        } 
    169169 
     
    221221 
    222222    function search_users( $filter, $user_id, $limit = null, $page = null ) { 
    223         global $wpdb; 
     223        global $wpdb, $bp; 
    224224 
    225225        $filter = like_escape( $wpdb->escape( $filter ) ); 
     
    233233        // filter the user_ids based on the search criteria. 
    234234        if ( bp_is_active( 'xprofile' ) ) { 
    235             $sql = "SELECT DISTINCT d.user_id as id FROM {$bp->profile->table_name_data} d, $users_table u WHERE d.user_id = u.id AND d.value LIKE '$filter%%' ORDER BY d.value DESC $pag_sql"; 
    236         } else { 
    237             $sql = "SELECT DISTINCT user_id as id FROM $usermeta_table WHERE meta_value LIKE '$filter%%' ORDER BY d.value DESC $pag_sql"; 
     235            $sql = "SELECT DISTINCT d.user_id as id FROM {$bp->profile->table_name_data} d, {$users_table} u WHERE d.user_id = u.id AND d.value LIKE '{$filter}%%' ORDER BY d.value DESC {$pag_sql}"; 
     236        } else { 
     237            $sql = "SELECT DISTINCT user_id as id FROM {$usermeta_table} WHERE meta_value LIKE '{$filter}%%' ORDER BY d.value DESC {$pag_sql}"; 
    238238        } 
    239239 
     
    256256        // filter the user_ids based on the search criteria. 
    257257        if ( bp_is_active( 'xprofile' ) ) { 
    258             $sql = "SELECT COUNT(DISTINCT d.user_id) FROM {$bp->profile->table_name_data} d, $users_table u WHERE d.user_id = u.id AND d.value LIKE '$filter%%'"; 
    259         } else { 
    260             $sql = "SELECT COUNT(DISTINCT user_id) FROM $usermeta_table WHERE meta_value LIKE '$filter%%'"; 
     258            $sql = "SELECT COUNT(DISTINCT d.user_id) FROM {$bp->profile->table_name_data} d, {$users_table} u WHERE d.user_id = u.id AND d.value LIKE '{$filter}%%'"; 
     259        } else { 
     260            $sql = "SELECT COUNT(DISTINCT user_id) FROM {$usermeta_table} WHERE meta_value LIKE '{$filter}%%'"; 
    261261        } 
    262262 
  • buddypress/tags/1.6.2/bp-groups/bp-groups-classes.php

    r634810 r636942  
    11351135        // If the user is logged in and viewing their random groups, we can show hidden and private groups 
    11361136        if ( bp_is_my_profile() ) { 
    1137             return $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT group_id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND is_confirmed = 1 AND is_banned = 0 ORDER BY rand() LIMIT $total_groups", $user_id ) ); 
     1137            return $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT group_id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND is_confirmed = 1 AND is_banned = 0 ORDER BY rand() LIMIT {$total_groups}", $user_id ) ); 
    11381138        } else { 
    1139             return $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT m.group_id FROM {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE m.group_id = g.id AND g.status != 'hidden' AND m.user_id = %d AND m.is_confirmed = 1 AND m.is_banned = 0 ORDER BY rand() LIMIT $total_groups", $user_id ) ); 
     1139            return $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT m.group_id FROM {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE m.group_id = g.id AND g.status != 'hidden' AND m.user_id = %d AND m.is_confirmed = 1 AND m.is_banned = 0 ORDER BY rand() LIMIT {$total_groups}", $user_id ) ); 
    11401140        } 
    11411141    } 
  • buddypress/tags/1.6.2/bp-groups/bp-groups-functions.php

    r634810 r636942  
    918918 
    919919    if ( !$meta_key ) 
    920         $wpdb->query( $wpdb->prepare( "DELETE FROM " . $bp->groups->table_name_groupmeta . " WHERE group_id = %d", $group_id ) ); 
     920        $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_groupmeta} WHERE group_id = %d", $group_id ) ); 
    921921    else if ( $meta_value ) 
    922         $wpdb->query( $wpdb->prepare( "DELETE FROM " . $bp->groups->table_name_groupmeta . " WHERE group_id = %d AND meta_key = %s AND meta_value = %s", $group_id, $meta_key, $meta_value ) ); 
     922        $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_groupmeta} WHERE group_id = %d AND meta_key = %s AND meta_value = %s", $group_id, $meta_key, $meta_value ) ); 
    923923    else 
    924         $wpdb->query( $wpdb->prepare( "DELETE FROM " . $bp->groups->table_name_groupmeta . " WHERE group_id = %d AND meta_key = %s", $group_id, $meta_key ) ); 
     924        $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_groupmeta} WHERE group_id = %d AND meta_key = %s", $group_id, $meta_key ) ); 
    925925 
    926926    // Delete the cached object 
     
    943943        $metas = wp_cache_get( 'bp_groups_groupmeta_' . $group_id . '_' . $meta_key, 'bp' ); 
    944944        if ( false === $metas ) { 
    945             $metas = $wpdb->get_col( $wpdb->prepare("SELECT meta_value FROM " . $bp->groups->table_name_groupmeta . " WHERE group_id = %d AND meta_key = %s", $group_id, $meta_key) ); 
     945            $metas = $wpdb->get_col( $wpdb->prepare("SELECT meta_value FROM {$bp->groups->table_name_groupmeta} WHERE group_id = %d AND meta_key = %s", $group_id, $meta_key) ); 
    946946            wp_cache_set( 'bp_groups_groupmeta_' . $group_id . '_' . $meta_key, $metas, 'bp' ); 
    947947        } 
    948948    } else { 
    949         $metas = $wpdb->get_col( $wpdb->prepare("SELECT meta_value FROM " . $bp->groups->table_name_groupmeta . " WHERE group_id = %d", $group_id) ); 
     949        $metas = $wpdb->get_col( $wpdb->prepare("SELECT meta_value FROM {$bp->groups->table_name_groupmeta} WHERE group_id = %d", $group_id) ); 
    950950    } 
    951951 
     
    978978    $meta_value = maybe_serialize( $meta_value ); 
    979979 
    980     $cur = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $bp->groups->table_name_groupmeta . " WHERE group_id = %d AND meta_key = %s", $group_id, $meta_key ) ); 
     980    $cur = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$bp->groups->table_name_groupmeta} WHERE group_id = %d AND meta_key = %s", $group_id, $meta_key ) ); 
    981981 
    982982    if ( !$cur ) 
    983         $wpdb->query( $wpdb->prepare( "INSERT INTO " . $bp->groups->table_name_groupmeta . " ( group_id, meta_key, meta_value ) VALUES ( %d, %s, %s )", $group_id, $meta_key, $meta_value ) ); 
     983        $wpdb->query( $wpdb->prepare( "INSERT INTO {$bp->groups->table_name_groupmeta} ( group_id, meta_key, meta_value ) VALUES ( %d, %s, %s )", $group_id, $meta_key, $meta_value ) ); 
    984984    else if ( $cur->meta_value != $meta_value ) 
    985         $wpdb->query( $wpdb->prepare( "UPDATE " . $bp->groups->table_name_groupmeta . " SET meta_value = %s WHERE group_id = %d AND meta_key = %s", $meta_value, $group_id, $meta_key ) ); 
     985        $wpdb->query( $wpdb->prepare( "UPDATE {$bp->groups->table_name_groupmeta} SET meta_value = %s WHERE group_id = %d AND meta_key = %s", $meta_value, $group_id, $meta_key ) ); 
    986986    else 
    987987        return false; 
  • buddypress/tags/1.6.2/bp-languages/buddypress.pot

    r634810 r636942  
    55"Project-Id-Version: BuddyPress \n" 
    66"Report-Msgid-Bugs-To: http://wppolyglots.wordpress.com\n" 
    7 "POT-Creation-Date: 2012-12-04 13:36:44+00:00\n" 
     7"POT-Creation-Date: 2012-12-10 06:36:53+00:00\n" 
    88"MIME-Version: 1.0\n" 
    99"Content-Type: text/plain; charset=UTF-8\n" 
     
    438438msgstr "" 
    439439 
    440 #: bp-activity/bp-activity-classes.php:120 
     440#: bp-activity/bp-activity-classes.php:122 
    441441#: bp-activity/bp-activity-template.php:120 
    442442msgid "Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details." 
     
    550550#: bp-members/bp-members-buddybar.php:90 bp-members/bp-members-loader.php:197 
    551551#: bp-members/bp-members-template.php:478 
    552 #: bp-members/bp-members-template.php:777 
    553 #: bp-members/bp-members-template.php:796 
     552#: bp-members/bp-members-template.php:778 
     553#: bp-members/bp-members-template.php:797 
    554554#: bp-messages/bp-messages-loader.php:255 
    555555#: bp-messages/bp-messages-template.php:326 
     
    704704#: bp-activity/bp-activity-template.php:2112 
    705705#: bp-core/admin/bp-core-slugs.php:112 bp-core/admin/bp-core-slugs.php:173 
    706 #: bp-members/bp-members-template.php:582 
     706#: bp-members/bp-members-template.php:583 
    707707#: bp-themes/bp-default/activity/entry.php:37 
    708708#: bp-themes/bp-default/functions.php:165 
     
    910910#: bp-blogs/bp-blogs-template.php:350 bp-core/bp-core-classes.php:177 
    911911#: bp-groups/bp-groups-widgets.php:80 bp-groups/bp-groups-widgets.php:185 
    912 #: bp-members/bp-members-template.php:553 
    913 #: bp-members/bp-members-template.php:828 
     912#: bp-members/bp-members-template.php:554 
     913#: bp-members/bp-members-template.php:829 
    914914#: bp-themes/bp-default/groups/groups-loop.php:47 
    915915#: bp-themes/bp-default/groups/single/group-header.php:42 
     
    10021002#: bp-blogs/bp-blogs-template.php:617 bp-core/deprecated/1.5.php:397 
    10031003#: bp-forums/bp-forums-template.php:1321 bp-groups/bp-groups-template.php:2292 
    1004 #: bp-members/bp-members-template.php:667 
     1004#: bp-members/bp-members-template.php:668 
    10051005#: bp-messages/bp-messages-template.php:373 bp-themes/bp-default/header.php:30 
    10061006#: bp-themes/bp-default/searchform.php:5 
     
    17791779 
    17801780#: bp-core/bp-core-buddybar.php:537 bp-core/deprecated/1.5.php:287 
    1781 #: bp-members/bp-members-template.php:731 bp-themes/bp-default/sidebar.php:18 
     1781#: bp-members/bp-members-template.php:732 bp-themes/bp-default/sidebar.php:18 
    17821782msgid "Log Out" 
    17831783msgstr "" 
     
    35843584msgstr "" 
    35853585 
    3586 #: bp-members/bp-members-template.php:555 
     3586#: bp-members/bp-members-template.php:556 
    35873587msgid "Never active" 
    35883588msgstr "" 
    35893589 
    3590 #: bp-members/bp-members-template.php:577 
     3590#: bp-members/bp-members-template.php:578 
    35913591msgctxt "member latest update in member directory" 
    35923592msgid "- &quot;%s &quot;" 
    35933593msgstr "" 
    35943594 
    3595 #: bp-members/bp-members-template.php:634 
     3595#: bp-members/bp-members-template.php:635 
    35963596msgid "registered %s" 
    35973597msgstr "" 
    35983598 
    3599 #: bp-members/bp-members-template.php:1076 
     3599#: bp-members/bp-members-template.php:1077 
    36003600msgid "Your Avatar" 
    36013601msgstr "" 
    36023602 
    3603 #: bp-members/bp-members-template.php:1146 
     3603#: bp-members/bp-members-template.php:1147 
    36043604msgid "Activity RSS Feed" 
    36053605msgstr "" 
  • buddypress/tags/1.6.2/bp-members/bp-members-functions.php

    r634810 r636942  
    505505        $exclude_users_sql = !empty( $exclude_users ) ? "AND user_id NOT IN (" . implode( ',', wp_parse_id_list( $exclude_users ) ) . ")" : ''; 
    506506 
    507         $count = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(user_id) FROM $wpdb->usermeta WHERE meta_key = %s {$exclude_users_sql}", bp_get_user_meta_key( 'last_activity' ) ) ); 
     507        $count = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(user_id) FROM {$wpdb->usermeta} WHERE meta_key = %s {$exclude_users_sql}", bp_get_user_meta_key( 'last_activity' ) ) ); 
    508508        set_transient( 'bp_active_member_count', $count ); 
    509509    } 
     
    771771        $user_id = bp_displayed_user_id(); 
    772772 
    773     return apply_filters( 'bp_core_get_all_posts_for_user', $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_author = %d AND post_status = 'publish' AND post_type = 'post'", $user_id ) ) ); 
     773    return apply_filters( 'bp_core_get_all_posts_for_user', $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_author = %d AND post_status = 'publish' AND post_type = 'post'", $user_id ) ) ); 
    774774} 
    775775 
     
    11241124 
    11251125        // Update the user status to '2' which we will use as 'not activated' (0 = active, 1 = spam, 2 = not active) 
    1126         $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->users SET user_status = 2 WHERE ID = %d", $user_id ) ); 
     1126        $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_status = 2 WHERE ID = %d", $user_id ) ); 
    11271127 
    11281128        // Set any profile data 
     
    12141214 
    12151215        // Get the user_id based on the $key 
    1216         $user_id = $wpdb->get_var( $wpdb->prepare( "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = 'activation_key' AND meta_value = %s", $key ) ); 
     1216        $user_id = $wpdb->get_var( $wpdb->prepare( "SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key = 'activation_key' AND meta_value = %s", $key ) ); 
    12171217 
    12181218        if ( empty( $user_id ) ) 
     
    12201220 
    12211221        // Change the user's status so they become active 
    1222         if ( !$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->users SET user_status = 0 WHERE ID = %d", $user_id ) ) ) 
     1222        if ( !$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_status = 0 WHERE ID = %d", $user_id ) ) ) 
    12231223            return new WP_Error( 'invalid_key', __( 'Invalid activation key', 'buddypress' ) ); 
    12241224 
     
    12351235    // Set the password on multisite installs 
    12361236    if ( is_multisite() && !empty( $user['meta']['password'] ) ) 
    1237         $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->users SET user_pass = %s WHERE ID = %d", $user['meta']['password'], $user_id ) ); 
     1237        $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_pass = %s WHERE ID = %d", $user['meta']['password'], $user_id ) ); 
    12381238 
    12391239    do_action( 'bp_core_activated_user', $user_id, $key, $user ); 
  • buddypress/tags/1.6.2/bp-xprofile/bp-xprofile-functions.php

    r634810 r636942  
    514514 
    515515    if ( !$meta_key ) 
    516         $wpdb->query( $wpdb->prepare( "DELETE FROM " . $bp->profile->table_name_meta . " WHERE object_id = %d AND object_type = %s", $object_id, $object_type ) ); 
     516        $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->profile->table_name_meta} WHERE object_id = %d AND object_type = %s", $object_id, $object_type ) ); 
    517517    else if ( $meta_value ) 
    518         $wpdb->query( $wpdb->prepare( "DELETE FROM " . $bp->profile->table_name_meta . " WHERE object_id = %d AND object_type = %s AND meta_key = %s AND meta_value = %s", $object_id, $object_type, $meta_key, $meta_value ) ); 
     518        $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->profile->table_name_meta} WHERE object_id = %d AND object_type = %s AND meta_key = %s AND meta_value = %s", $object_id, $object_type, $meta_key, $meta_value ) ); 
    519519    else 
    520         $wpdb->query( $wpdb->prepare( "DELETE FROM " . $bp->profile->table_name_meta . " WHERE object_id = %d AND object_type = %s AND meta_key = %s", $object_id, $object_type, $meta_key ) ); 
     520        $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->profile->table_name_meta} WHERE object_id = %d AND object_type = %s AND meta_key = %s", $object_id, $object_type, $meta_key ) ); 
    521521 
    522522    // Delete the cached object 
     
    544544 
    545545        if ( !$metas = wp_cache_get( 'bp_xprofile_meta_' . $object_type . '_' . $object_id . '_' . $meta_key, 'bp' ) ) { 
    546             $metas = $wpdb->get_col( $wpdb->prepare( "SELECT meta_value FROM " . $bp->profile->table_name_meta . " WHERE object_id = %d AND object_type = %s AND meta_key = %s", $object_id, $object_type, $meta_key ) ); 
     546            $metas = $wpdb->get_col( $wpdb->prepare( "SELECT meta_value FROM {$bp->profile->table_name_meta} WHERE object_id = %d AND object_type = %s AND meta_key = %s", $object_id, $object_type, $meta_key ) ); 
    547547            wp_cache_set( 'bp_xprofile_meta_' . $object_type . '_' . $object_id . '_' . $meta_key, $metas, 'bp' ); 
    548548        } 
    549549    } else { 
    550         $metas = $wpdb->get_col( $wpdb->prepare( "SELECT meta_value FROM " . $bp->profile->table_name_meta . " WHERE object_id = %d AND object_type = %s", $object_id, $object_type ) ); 
     550        $metas = $wpdb->get_col( $wpdb->prepare( "SELECT meta_value FROM {$bp->profile->table_name_meta} WHERE object_id = %d AND object_type = %s", $object_id, $object_type ) ); 
    551551    } 
    552552 
     
    591591        return bp_xprofile_delete_meta( $object_id, $object_type, $meta_key ); 
    592592 
    593     $cur = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $bp->profile->table_name_meta . " WHERE object_id = %d AND object_type = %s AND meta_key = %s", $object_id, $object_type, $meta_key ) ); 
     593    $cur = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$bp->profile->table_name_meta} WHERE object_id = %d AND object_type = %s AND meta_key = %s", $object_id, $object_type, $meta_key ) ); 
    594594 
    595595    if ( empty( $cur ) ) 
    596         $wpdb->query( $wpdb->prepare( "INSERT INTO " . $bp->profile->table_name_meta . " ( object_id, object_type, meta_key, meta_value ) VALUES ( %d, %s, %s, %s )", $object_id, $object_type,  $meta_key, $meta_value ) ); 
     596        $wpdb->query( $wpdb->prepare( "INSERT INTO {$bp->profile->table_name_meta} ( object_id, object_type, meta_key, meta_value ) VALUES ( %d, %s, %s, %s )", $object_id, $object_type,  $meta_key, $meta_value ) ); 
    597597    else if ( $cur->meta_value != $meta_value ) 
    598         $wpdb->query( $wpdb->prepare( "UPDATE " . $bp->profile->table_name_meta . " SET meta_value = %s WHERE object_id = %d AND object_type = %s AND meta_key = %s", $meta_value, $object_id, $object_type, $meta_key ) ); 
     598        $wpdb->query( $wpdb->prepare( "UPDATE {$bp->profile->table_name_meta} SET meta_value = %s WHERE object_id = %d AND object_type = %s AND meta_key = %s", $meta_value, $object_id, $object_type, $meta_key ) ); 
    599599    else 
    600600        return false; 
  • buddypress/tags/1.6.2/readme.txt

    r634810 r636942  
    22Contributors: johnjamesjacoby, DJPaul, boonebgorges 
    33Tags: buddypress, social networking, activity, profiles, messaging, friends, groups, forums, microblogging, twitter, facebook, social, community, networks, networking, cms 
    4 Requires at least: 3.5 
    5 Tested up to: 3.5 
     4Requires at least: 3.4 
     5Tested up to: 3.4.1 
    66Stable tag: 1.6.2 
    77License: GPLv2 or later 
Note: See TracChangeset for help on using the changeset viewer.