From 615ff74d5ba7488f325032fab90ff525554e6456 Mon Sep 17 00:00:00 2001 From: Bart van Bragt Date: Mon, 21 Jan 2002 14:37:53 +0000 Subject: [PATCH] Fixed rounding errors in postcounts (view profile) git-svn-id: file:///svn/phpbb/trunk@1915 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/profile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/profile.php b/phpBB/profile.php index 24c87afb05..d48e1bf2af 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -242,13 +242,13 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) $regdate = $profiledata['user_regdate']; $memberdays = max(1, round( ( time() - $regdate ) / 86400 )); - $posts_per_day = sprintf("%.2f", $profiledata['user_posts'] / $memberdays); + $posts_per_day = $profiledata['user_posts'] / $memberdays; // Get the users percentage of total posts if( $profiledata['user_posts'] != 0 ) { $total_posts = get_db_stat("postcount"); - $percentage = ( $total_posts ) ? sprintf("%.2f", min(100, ($profiledata['user_posts'] / $total_posts) * 100)) : 0; + $percentage = ( $total_posts ) ? min(100, ($profiledata['user_posts'] / $total_posts) * 100) : 0; } else {