Changeset 2666
- Timestamp:
- 11/29/2010 12:44:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-template.php
r2662 r2666 1065 1065 1066 1066 // Only add pagination if query returned results 1067 if ( ( int)$bbp_topics_template->post_count&& (int)$bbp_topics_template->posts_per_page ) {1067 if ( ( (int)$bbp_topics_template->post_count || (int)$bbp_topics_template->found_posts ) && (int)$bbp_topics_template->posts_per_page ) { 1068 1068 1069 1069 // If pretty permalinks are enabled, make our pagination pretty … … 1077 1077 'base' => $base, 1078 1078 'format' => '', 1079 'total' => $posts_per_page == $bbp_topics_template-> post_count? 1 : ceil( (int)$bbp_topics_template->found_posts / (int)$posts_per_page ),1079 'total' => $posts_per_page == $bbp_topics_template->found_posts ? 1 : ceil( (int)$bbp_topics_template->found_posts / (int)$posts_per_page ), 1080 1080 'current' => (int)$bbp_topics_template->paged, 1081 1081 'prev_text' => '←', … … 1994 1994 $from_num = bbp_number_format( $start_num ); 1995 1995 $to_num = bbp_number_format( ( $start_num + ( $bbp_topics_template->posts_per_page - 1 ) > $bbp_topics_template->found_posts ) ? $bbp_topics_template->found_posts : $start_num + ( $bbp_topics_template->posts_per_page - 1 ) ); 1996 $total = bbp_number_format( $bbp_topics_template->post_count );1996 $total = bbp_number_format( !empty( $bbp_topics_template->found_posts ) ? $bbp_topics_template->found_posts : $bbp_topics_template->post_count ); 1997 1997 1998 1998 // Set return string
Note: See TracChangeset
for help on using the changeset viewer.