Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/20/2010 10:04:08 AM (16 years ago)
Author:
apeatling
Message:

Fixes #1481 - prevent possible number_format() fail. Props jjj

File:
1 edited

Legend:

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

    r2362 r2375  
    650650    global $bp, $forum_template;
    651651
    652     $from_num = number_format( intval( ( $forum_template->pag_page - 1 ) * $forum_template->pag_num ) + 1 );
    653     $to_num = number_format( ( $from_num + ( $forum_template->pag_num - 1  ) > $forum_template->total_topic_count ) ? $forum_template->total_topic_count : $from_num + ( $forum_template->pag_num - 1 ) );
    654     $total = number_format( $forum_template->total_topic_count );
     652    $from_num = bp_core_number_format( intval( ( $forum_template->pag_page - 1 ) * $forum_template->pag_num ) + 1 );
     653    $to_num = bp_core_number_format( ( $from_num + ( $forum_template->pag_num - 1  ) > $forum_template->total_topic_count ) ? $forum_template->total_topic_count : $from_num + ( $forum_template->pag_num - 1 ) );
     654    $total = bp_core_number_format( $forum_template->total_topic_count );
    655655
    656656    echo apply_filters( 'bp_forum_pagination_count', sprintf( __( 'Viewing topic %s to %s (%s total topics)', 'buddypress' ), $from_num, $to_num, $total ) );
Note: See TracChangeset for help on using the changeset viewer.