Skip to:
Content

bbPress.org

Changeset 2666


Ignore:
Timestamp:
11/29/2010 12:44:16 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Fix previous topic pagination adjustments for author favorites

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-template.php

    r2662 r2666  
    10651065
    10661066    // 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 ) {
    10681068
    10691069        // If pretty permalinks are enabled, make our pagination pretty
     
    10771077            'base'      => $base,
    10781078            '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 ),
    10801080            'current'   => (int)$bbp_topics_template->paged,
    10811081            'prev_text' => '←',
     
    19941994        $from_num  = bbp_number_format( $start_num );
    19951995        $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 );
    19971997
    19981998        // Set return string
Note: See TracChangeset for help on using the changeset viewer.