Changeset 5129 for trunk/bp-forums/bp-forums-template.php
- Timestamp:
- 09/09/2011 03:06:13 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-template.php
r5112 r5129 137 137 $this->total_topic_count = 0; 138 138 } else { 139 // Get a total topic count, for use in pagination. This value will differ 140 // depending on scope 139 141 if ( !empty( $forum_id ) ) { 142 // Group forums 140 143 $topic_count = bp_forums_get_forum( $forum_id ); 141 144 $topic_count = (int)$topic_count->topics; 142 145 } else if ( !empty( $bp->groups->current_group ) ) { 143 146 $topic_count = (int)groups_total_public_forum_topic_count( $type ); 144 } else if ( bp_is_user_forums_started() ) { 145 $topic_count = bp_forums_total_topic_count_for_user( bp_displayed_user_id() ); 147 } else if ( bp_is_user_forums_started() || ( bp_is_directory() && $user_id ) ) { 148 // This covers the case of Profile > Forums > Topics Started, as 149 // well as Forum Directory > My Topics 150 $topic_count = bp_forums_total_topic_count_for_user( bp_displayed_user_id(), $type ); 146 151 } else if ( bp_is_user_forums_replied_to() ) { 147 $topic_count = bp_forums_total_replied_count_for_user( bp_displayed_user_id() ); 152 // Profile > Forums > Replied To 153 $topic_count = bp_forums_total_replied_count_for_user( bp_displayed_user_id(), $type ); 148 154 } else { 149 // For forum directories , get a true count155 // For forum directories (All Topics), get a true count 150 156 $status = is_super_admin() ? 'all' : 'public'; // todo: member-of 151 157 $topic_count = (int)groups_total_forum_topic_count( $status, $search_terms );
Note: See TracChangeset
for help on using the changeset viewer.