diff options
author | Bart van Bragt <bartvb@users.sourceforge.net> | 2002-01-21 14:37:53 +0000 |
---|---|---|
committer | Bart van Bragt <bartvb@users.sourceforge.net> | 2002-01-21 14:37:53 +0000 |
commit | 615ff74d5ba7488f325032fab90ff525554e6456 (patch) | |
tree | bdbcb364b7e780bda9e225bbf3e8cb2f6184a9a0 | |
parent | 1469c7a13135fc7a5588e12ca82e95fb047597f0 (diff) | |
download | forums-615ff74d5ba7488f325032fab90ff525554e6456.tar forums-615ff74d5ba7488f325032fab90ff525554e6456.tar.gz forums-615ff74d5ba7488f325032fab90ff525554e6456.tar.bz2 forums-615ff74d5ba7488f325032fab90ff525554e6456.tar.xz forums-615ff74d5ba7488f325032fab90ff525554e6456.zip |
Fixed rounding errors in postcounts (view profile)
git-svn-id: file:///svn/phpbb/trunk@1915 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/profile.php | 4 |
1 files 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 { |