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-messages/bp-messages-templatetags.php

    r2287 r2375  
    274274    global $messages_template;
    275275
    276     $from_num = number_format( intval( ( $messages_template->pag_page - 1 ) * $messages_template->pag_num ) + 1 );
    277     $to_num = number_format( ( $from_num + ( $messages_template->pag_num - 1 ) > $messages_template->total_thread_count ) ? $messages_template->total_thread_count : $from_num + ( $messages_template->pag_num - 1 ) );
    278     $total = number_format( $messages_template->total_thread_count );
     276    $from_num = bp_core_number_format( intval( ( $messages_template->pag_page - 1 ) * $messages_template->pag_num ) + 1 );
     277    $to_num = bp_core_number_format( ( $from_num + ( $messages_template->pag_num - 1 ) > $messages_template->total_thread_count ) ? $messages_template->total_thread_count : $from_num + ( $messages_template->pag_num - 1 ) );
     278    $total = bp_core_number_format( $messages_template->total_thread_count );
    279279
    280280    echo sprintf( __( 'Viewing message %s to %s (of %s messages)', 'buddypress' ), $from_num, $to_num, $total ); ?>  
Note: See TracChangeset for help on using the changeset viewer.