Skip to:
Content

BuddyPress.org


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

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

File:
1 edited

Legend:

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

    r2370 r2375  
    172172    global $bp, $activities_template;
    173173
    174     $from_num = number_format( intval( ( $activities_template->pag_page - 1 ) * $activities_template->pag_num ) + 1 );
    175     $to_num = number_format( ( $from_num + ( $activities_template->pag_num - 1 ) > $activities_template->total_activity_count ) ? $activities_template->total_activity_count : $from_num + ( $activities_template->pag_num - 1 ) );
    176     $total = number_format( $activities_template->total_activity_count );
     174    $from_num = bp_core_number_format( intval( ( $activities_template->pag_page - 1 ) * $activities_template->pag_num ) + 1 );
     175    $to_num = bp_core_number_format( ( $from_num + ( $activities_template->pag_num - 1 ) > $activities_template->total_activity_count ) ? $activities_template->total_activity_count : $from_num + ( $activities_template->pag_num - 1 ) );
     176    $total = bp_core_number_format( $activities_template->total_activity_count );
    177177
    178178    echo sprintf( __( 'Viewing item %s to %s (of %s items)', 'buddypress' ), $from_num, $to_num, $total ); ?>  
Note: See TracChangeset for help on using the changeset viewer.