Changeset 3933 for trunk/bp-forums/bp-forums-template.php
- Timestamp:
- 01/26/2011 03:28:35 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-template.php
r3911 r3933 102 102 $this->total_topic_count = 0; 103 103 } else { 104 if ( $forum_id) {104 if ( !empty( $forum_id ) ) { 105 105 $topic_count = bp_forums_get_forum( $forum_id ); 106 106 $topic_count = (int)$topic_count->topics; 107 } else if ( function_exists( 'groups_total_public_forum_topic_count') ) {107 } else if ( !empty( $bp->groups->current_group ) ) { 108 108 $topic_count = (int)groups_total_public_forum_topic_count( $type ); 109 109 } else { … … 217 217 * pass their parameters directly to the loop. 218 218 */ 219 $type = 'newest';220 $user_id = 0;221 $forum_id = false;219 $type = 'newest'; 220 $user_id = 0; 221 $forum_id = false; 222 222 $search_terms = false; 223 $no_stickies = 'all';223 $no_stickies = 'all'; 224 224 225 225 // User filtering … … 732 732 global $bp, $forum_template; 733 733 734 $start_num = intval( ( $forum_template->pag_page - 1 ) * $forum_template->pag_num ) + 1; 735 $from_num = bp_core_number_format( $start_num ); 736 $to_num = bp_core_number_format( ( $start_num + ( $forum_template->pag_num - 1 ) > $forum_template->total_topic_count ) ? $forum_template->total_topic_count : $start_num + ( $forum_template->pag_num - 1 ) ); 737 $total = bp_core_number_format( $forum_template->total_topic_count ); 738 734 $start_num = intval( ( $forum_template->pag_page - 1 ) * $forum_template->pag_num ) + 1; 735 $from_num = bp_core_number_format( $start_num ); 736 $to_num = bp_core_number_format( ( $start_num + ( $forum_template->pag_num - 1 ) > $forum_template->total_topic_count ) ? $forum_template->total_topic_count : $start_num + ( $forum_template->pag_num - 1 ) ); 737 $total = bp_core_number_format( $forum_template->total_topic_count ); 739 738 $pag_filter = false; 739 740 740 if ( 'tags' == $forum_template->type && !empty( $forum_template->search_terms ) ) 741 741 $pag_filter = sprintf( __( ' matching tag "%s"', 'buddypress' ), $forum_template->search_terms );
Note: See TracChangeset
for help on using the changeset viewer.