Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/15/2014 10:32:54 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Add brackets to conditional statements in bp-messages-functions.php.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-functions.php

    r8618 r8619  
    201201                $error = 0;
    202202                for ( $i = 0, $count = count( $thread_ids ); $i < $count; ++$i ) {
    203                         if ( !$status = BP_Messages_Thread::delete( $thread_ids[$i]) ) {
     203                        if ( ! BP_Messages_Thread::delete( $thread_ids[$i] ) ) {
    204204                                $error = 1;
    205205                        }
    206206                }
    207207
    208                 if ( !empty( $error ) )
     208                if ( ! empty( $error ) ) {
    209209                        return false;
     210                }
    210211
    211212                do_action( 'messages_delete_thread', $thread_ids );
    … …  
    213214                return true;
    214215        } else {
    215                 if ( !BP_Messages_Thread::delete( $thread_ids ) )
     216                if ( ! BP_Messages_Thread::delete( $thread_ids ) ) {
    216217                        return false;
     218                }
    217219
    218220                do_action( 'messages_delete_thread', $thread_ids );
    … …  
    231233 */
    232234function messages_check_thread_access( $thread_id, $user_id = 0 ) {
    233         if ( empty( $user_id ) )
     235        if ( empty( $user_id ) ) {
    234236                $user_id = bp_loggedin_user_id();
     237        }
    235238
    236239        return BP_Messages_Thread::check_access( $thread_id, $user_id );
    … …  
    295298 */
    296299function messages_get_unread_count( $user_id = 0 ) {
    297         if ( empty( $user_id ) )
     300        if ( empty( $user_id ) ) {
    298301                $user_id = bp_loggedin_user_id();
     302        }
    299303
    300304        return BP_Messages_Thread::get_inbox_count( $user_id );
Note: See TracChangeset for help on using the changeset viewer.