Skip to:
Content

Changeset 9195


Ignore:
Timestamp:
11/27/2014 07:24:56 PM (4 years ago)
Author:
r-a-y
Message:

Do not fetch meta cache when getting a thread's total message count.

Also add defaults to the BP_Messages_Thread_Template constructor.

See #3083.

File:
1 edited

Legend:

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

    r9188 r9195  
    726726        }
    727727
    728         $thread_template = new BP_Messages_Thread_Template( $thread_id, 'ASC' );
     728        $thread_template = new BP_Messages_Thread_Template( $thread_id, 'ASC', array(
     729            'update_meta_cache' => false
     730        ) );
    729731
    730732        $count = 0;
     
    14701472     * @see BP_Messages_Thread::populate() for full parameter info
    14711473     */
    1472     public function __construct( $thread_id, $order, $args ) {
     1474    public function __construct( $thread_id = 0, $order = 'ASC', $args = array() ) {
    14731475        $this->thread        = new BP_Messages_Thread( $thread_id, $order, $args );
    14741476        $this->message_count = count( $this->thread->messages );
Note: See TracChangeset for help on using the changeset viewer.