Skip to:
Content

BuddyPress.org

Changeset 2401


Ignore:
Timestamp:
01/22/2010 10:56:21 AM (14 years ago)
Author:
apeatling
Message:

Fixes #1654

File:
1 edited

Legend:

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

    r2397 r2401  
    162162        global $messages_template;
    163163
    164         /* Notice support */
    165         if ( empty( $messages_template->thread->thread_id ) )
    166             $id = $messages_template->thread->id;
    167         else
    168             $id = $messages_template->thread->thread_id;
    169 
    170164        return apply_filters( 'bp_get_message_thread_id', $id );
    171165    }
     
    177171        global $messages_template;
    178172
    179         /* Notice support */
    180         if ( empty( $messages_template->thread->last_message_subject ) )
    181             $subject = $messages_template->thread->subject;
    182         else
    183             $subject = $messages_template->thread->last_message_subject;
    184 
    185173        return apply_filters( 'bp_get_message_thread_subject', stripslashes_deep( $subject ) );
    186174    }
     
    192180        global $messages_template;
    193181
    194         /* Notice support */
    195         if ( empty( $messages_template->thread->last_message_message ) )
    196             $message = $messages_template->thread->message;
    197         else
    198             $message = $messages_template->thread->last_message_message;
    199 
    200182        return apply_filters( 'bp_get_message_thread_excerpt', strip_tags( bp_create_excerpt( $message, 10 ) ) );
    201183    }
     
    206188    function bp_get_message_thread_from() {
    207189        global $messages_template, $bp;
    208 
    209         /* Notice support */
    210         if ( empty( $messages_template->thread->last_sender_id ) )
    211             $sender = $bp->loggedin_user->id;
    212         else
    213             $sender = $messages_template->thread->last_sender_id;
    214190
    215191        return apply_filters( 'bp_get_message_thread_from', bp_core_get_userlink($sender) );
     
    262238
    263239function bp_message_thread_last_post_date() {
    264     echo bp_get_message_thread_last_post_date();
     240    return bp_get_message_thread_last_post_date();
    265241}
    266242    function bp_get_message_thread_last_post_date() {
    267243        global $messages_template;
    268 
    269         /* Notice support */
    270         if ( empty( $messages_template->thread->last_post_date ) )
    271             $date = $messages_template->thread->date_sent;
    272         else
    273             $date = $messages_template->thread->last_post_date;
    274244
    275245        echo apply_filters( 'bp_get_message_thread_last_post_date', bp_format_time( strtotime($date) ) );
     
    281251    function bp_get_message_thread_avatar() {
    282252        global $messages_template, $bp;
    283 
    284         /* Notice support */
    285         if ( empty( $messages_template->thread->last_sender_id ) )
    286             $sender = $bp->loggedin_user->id;
    287         else
    288             $sender = $messages_template->thread->last_sender_id;
    289253
    290254        echo apply_filters( 'bp_get_message_thread_avatar', bp_core_fetch_avatar( array( 'item_id' => $sender, 'type' => 'thumb' ) ) );
Note: See TracChangeset for help on using the changeset viewer.