Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/01/2011 09:38:00 PM (13 years ago)
Author:
boonebgorges
Message:

Do a proper topic count when viewing a forum tag archive. Fixes #3761

File:
1 edited

Legend:

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

    r5379 r5433  
    152152                // Profile > Forums > Replied To
    153153                $topic_count = bp_forums_total_replied_count_for_user( bp_displayed_user_id(), $type );
     154            } else if ( 'tags' == $type ) {
     155                $tag         = bb_get_tag( $search_terms );
     156                $topic_count = $tag->count;
    154157            } else {
    155158                // For forum directories (All Topics), get a true count
     
    416419        $forum_template = new BP_Forums_Template_Forum( $type, $forum_id, $user_id, $page, $per_page, $max, 'all', $search_terms );
    417420    }
    418 
     421   
    419422    return apply_filters( 'bp_has_topics', $forum_template->has_topics(), $forum_template );
    420423}
     
    972975}
    973976
    974 
    975977class BP_Forums_Template_Topic {
    976978    var $current_post = -1;
Note: See TracChangeset for help on using the changeset viewer.