Skip to:
Content

BuddyPress.org

Changeset 5986


Ignore:
Timestamp:
04/13/2012 04:31:42 PM (14 years ago)
Author:
boonebgorges
Message:

Whitespace cleanup

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-cache.php

    r5683 r5986  
    5555function bp_update_meta_cache( $args = array() ) {
    5656    global $wpdb;
    57    
     57
    5858    $defaults = array(
    5959        'object_ids'       => array(), // Comma-separated list or array of item ids
     
    6666    $r = wp_parse_args( $args, $defaults );
    6767    extract( $r );
    68        
     68
    6969    if ( empty( $object_ids ) || empty( $object_type ) || empty( $meta_table ) ) {
    7070        return false;
    7171    }
    72    
     72
    7373    if ( empty( $cache_key_prefix ) ) {
    7474        $cache_key_prefix = $meta_table;
    7575    }
    76    
     76
    7777    if ( empty( $object_column ) ) {
    7878        $object_column = $object_type . '_id';
     
    8787
    8888    $cache = array();
    89    
     89
    9090    // Get meta info
    9191    $id_list   = join( ',', $object_ids );
     
    108108        }
    109109    }
    110    
     110
    111111    foreach ( $object_ids as $id ) {
    112112        if ( ! isset($cache[$id]) )
    113113            $cache[$id] = array();
    114    
     114
    115115        foreach( $cache[$id] as $meta_key => $meta_value ) {
    116116            wp_cache_set( $cache_key_prefix . '_' . $id . '_' . $meta_key, $meta_value, 'bp' );
  • trunk/bp-members/bp-members-functions.php

    r5927 r5986  
    501501function bp_core_process_spammer_status( $user_id, $status ) {
    502502    global $wpdb;
    503    
     503
    504504    // Only super admins can currently spam users
    505505    if ( !is_super_admin() || bp_is_my_profile() )
     
    509509    if ( empty( $user_id ) )
    510510        return;
    511        
     511
    512512    // Bail if user ID is super admin
    513513    if ( is_super_admin( $user_id ) )
    514514        return;
    515    
     515
    516516    // Get the functions file
    517517    if ( is_multisite() ) {
     
    530530        // Get the blogs for the user
    531531        $blogs = get_blogs_of_user( $user_id, true );
    532        
     532
    533533        foreach ( (array) $blogs as $key => $details ) {
    534        
     534
    535535            // Do not mark the main or current root blog as spam
    536536            if ( 1 == $details->userblog_id || bp_get_root_blog_id() == $details->userblog_id ) {
    537537                continue;
    538538            }
    539        
     539
    540540            // Update the blog status
    541541            update_blog_status( $details->userblog_id, 'spam', $is_spam );
    542542        }
    543        
     543
    544544        // Finally, mark this user as a spammer
    545545        if ( is_multisite() ) {
    546546            update_user_status( $user_id, 'spam', $is_spam );
    547547        }
    548        
     548
    549549        // Always set single site status
    550550        $wpdb->update( $wpdb->users, array( 'user_status' => $is_spam ), array( 'ID' => $user_id ) );
    551                
     551
    552552        // Call multisite actions in single site mode for good measure
    553553        if ( !is_multisite() ) {
     
    568568    // Allow plugins to do neat things
    569569    do_action( 'bp_core_process_spammer_status', $user_id, $is_spam );
    570    
     570
    571571    return true;
    572572}
     
    576576 *
    577577 * @since BuddyPress (1.6)
    578  * 
     578 *
    579579 * @param int $user_id The user id passed from the make_spam_user hook
    580580 */
     
    588588 *
    589589 * @since BuddyPress (1.6)
    590  * 
     590 *
    591591 * @param int $user_id The user id passed from the make_ham_user hook
    592592 */
     
    673673/**
    674674 * Checks if user is active
    675  * 
     675 *
    676676 * @since BuddyPress (1.6)
    677  * 
     677 *
    678678 * @uses is_user_logged_in() To check if user is logged in
    679679 * @uses bp_loggedin_user_id() To get current user ID
     
    708708/**
    709709 * Checks if user is not active.
    710  * 
     710 *
    711711 * @since BuddyPress (1.6)
    712  * 
     712 *
    713713 * @uses is_user_logged_in() To check if user is logged in
    714714 * @uses bp_get_displayed_user_id() To get current user ID
     
    10541054                    $current_field = $usermeta["field_{$field_id}"];
    10551055                    xprofile_set_field_data( $field_id, $user_id, $current_field );
    1056                    
     1056
    10571057                    // Save the visibility level
    10581058                    $visibility_level = !empty( $usermeta['field_' . $field_id . '_visibility'] ) ? $usermeta['field_' . $field_id . '_visibility'] : 'public';
     
    11161116                    if ( !empty( $current_field ) )
    11171117                        xprofile_set_field_data( $field_id, $user_id, $current_field );
    1118                    
     1118
    11191119                    // Save the visibility level
    11201120                    $visibility_level = !empty( $user['meta']['field_' . $field_id . '_visibility'] ) ? $user['meta']['field_' . $field_id . '_visibility'] : 'public';
     
    12601260    if ( is_admin() || is_network_admin() )
    12611261        return;
    1262    
     1262
    12631263    // Not at the WP core signup page and action is not register
    12641264    if ( false === strpos( $_SERVER['SCRIPT_NAME'], 'wp-signup.php' ) && ( 'register' != $action ) )
Note: See TracChangeset for help on using the changeset viewer.