Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/11/2012 09:32:04 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Breathing room for cast variables.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-messages/bp-messages-template.php

    r5705 r5729  
    5656            $total_notice_count = BP_Messages_Notice::get_total_notice_count();
    5757
    58             if ( !$max || $max >= (int)$total_notice_count ) {
     58            if ( !$max || $max >= (int) $total_notice_count ) {
    5959                if ( 'notices' == $this->box ) {
    60                     $this->total_thread_count = (int)$total_notice_count;
     60                    $this->total_thread_count = (int) $total_notice_count;
    6161                }
    6262            } else {
    63                 $this->total_thread_count = (int)$max;
     63                $this->total_thread_count = (int) $max;
    6464            }
    6565
     
    6868                    $this->thread_count = count( $this->threads );
    6969                } else {
    70                     $this->thread_count = (int)$max;
     70                    $this->thread_count = (int) $max;
    7171                }
    7272            } else {
     
    7575        }
    7676
    77         if ( (int)$this->total_thread_count && (int)$this->pag_num ) {
     77        if ( (int) $this->total_thread_count && (int) $this->pag_num ) {
    7878            $this->pag_links = paginate_links( array(
    7979                'base'      => add_query_arg( 'mpage', '%#%' ),
    8080                'format'    => '',
    81                 'total'     => ceil( (int)$this->total_thread_count / (int)$this->pag_num ),
     81                'total'     => ceil( (int) $this->total_thread_count / (int) $this->pag_num ),
    8282                'current'   => $this->pag_page,
    8383                'prev_text' => _x( '←', 'Message pagination previous text', 'buddypress' ),
     
    130130        if ( 'notices' != $bp->current_action ) {
    131131            $last_message_index = count( $this->thread->messages ) - 1;
    132             $this->thread->messages = array_reverse( (array)$this->thread->messages );
     132            $this->thread->messages = array_reverse( (array) $this->thread->messages );
    133133
    134134            // Set up the last message data
    135135            if ( count($this->thread->messages) > 1 ) {
    136136                if ( 'inbox' == $this->box ) {
    137                     foreach ( (array)$this->thread->messages as $key => $message ) {
     137                    foreach ( (array) $this->thread->messages as $key => $message ) {
    138138                        if ( bp_loggedin_user_id() != $message->sender_id ) {
    139139                            $last_message_index = $key;
     
    143143
    144144                } elseif ( 'sentbox' == $this->box ) {
    145                     foreach ( (array)$this->thread->messages as $key => $message ) {
     145                    foreach ( (array) $this->thread->messages as $key => $message ) {
    146146                        if ( bp_loggedin_user_id() == $message->sender_id ) {
    147147                            $last_message_index = $key;
     
    296296        global $messages_template;
    297297
    298         if ( (int)$messages_template->thread->unread_count )
     298        if ( (int) $messages_template->thread->unread_count )
    299299            return apply_filters( 'bp_get_message_thread_unread_count', $messages_template->thread->unread_count );
    300300
     
    493493        global $messages_template, $bp;
    494494
    495         if ( 1 == (int)$messages_template->thread->is_active ) {
     495        if ( 1 == (int) $messages_template->thread->is_active ) {
    496496            $link = wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . $bp->messages->slug . '/notices/deactivate/' . $messages_template->thread->id ), 'messages_deactivate_notice' );
    497497        } else {
     
    507507        global $messages_template;
    508508
    509         if ( 1 == (int)$messages_template->thread->is_active  ) {
     509        if ( 1 == (int) $messages_template->thread->is_active  ) {
    510510            $text = __('Deactivate', 'buddypress');
    511511        } else {
     
    788788            return apply_filters( 'bp_get_the_thread_recipients', sprintf( __( '%d Recipients', 'buddypress' ), count($thread_template->thread->recipients) ) );
    789789
    790         foreach( (array)$thread_template->thread->recipients as $recipient ) {
     790        foreach( (array) $thread_template->thread->recipients as $recipient ) {
    791791            if ( (int) $recipient->user_id !== bp_loggedin_user_id() )
    792792                $recipient_links[] = bp_core_get_userlink( $recipient->user_id );
Note: See TracChangeset for help on using the changeset viewer.