|
From: Bart v. B. <ba...@us...> - 2002-01-21 14:37:57
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv6422
Modified Files:
profile.php
Log Message:
Fixed rounding errors in postcounts (view profile)
Index: profile.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/profile.php,v
retrieving revision 1.167
retrieving revision 1.168
diff -C2 -r1.167 -r1.168
*** profile.php 2002/01/14 23:34:54 1.167
--- profile.php 2002/01/21 14:37:53 1.168
***************
*** 243,247 ****
$memberdays = max(1, round( ( time() - $regdate ) / 86400 ));
! $posts_per_day = sprintf("%.2f", $profiledata['user_posts'] / $memberdays);
// Get the users percentage of total posts
--- 243,247 ----
$memberdays = max(1, round( ( time() - $regdate ) / 86400 ));
! $posts_per_day = $profiledata['user_posts'] / $memberdays;
// Get the users percentage of total posts
***************
*** 249,253 ****
{
$total_posts = get_db_stat("postcount");
! $percentage = ( $total_posts ) ? sprintf("%.2f", min(100, ($profiledata['user_posts'] / $total_posts) * 100)) : 0;
}
else
--- 249,253 ----
{
$total_posts = get_db_stat("postcount");
! $percentage = ( $total_posts ) ? min(100, ($profiledata['user_posts'] / $total_posts) * 100) : 0;
}
else
|