mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Another Pauls up
git-svn-id: file:///svn/phpbb/trunk@1459 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
5aa70cf3be
commit
7d7c3a53fb
1 changed files with 3 additions and 3 deletions
|
@ -248,10 +248,10 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
||||||
$posts_per_day = sprintf("%.2f", $profiledata['user_posts'] / $memberdays);
|
$posts_per_day = sprintf("%.2f", $profiledata['user_posts'] / $memberdays);
|
||||||
|
|
||||||
// Get the users percentage of total posts
|
// Get the users percentage of total posts
|
||||||
if( $profiledata['user_posts'] != 0 && $total_posts != 0 )
|
if( $profiledata['user_posts'] != 0 )
|
||||||
{
|
{
|
||||||
$total_posts = get_db_stat("postcount");
|
$total_posts = get_db_stat("postcount");
|
||||||
$percentage = sprintf("%.2f", ($profiledata['user_posts'] / $total_posts) * 100);
|
$percentage = ( $total_posts ) ? sprintf("%.2f", ($profiledata['user_posts'] / $total_posts) * 100) : 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -358,7 +358,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
"USERNAME" => $profiledata['username'],
|
"USERNAME" => $profiledata['username'],
|
||||||
"JOINED" => create_date($board_config['default_dateformat'], $profiledata['user_regdate'], $board_config['board_timezone']),
|
"JOINED" => create_date($lang['DATE_FORMAT'], $profiledata['user_regdate'], $board_config['board_timezone']),
|
||||||
"POSTER_RANK" => $poster_rank,
|
"POSTER_RANK" => $poster_rank,
|
||||||
"RANK_IMAGE" => $rank_image,
|
"RANK_IMAGE" => $rank_image,
|
||||||
"POSTS_PER_DAY" => $posts_per_day,
|
"POSTS_PER_DAY" => $posts_per_day,
|
||||||
|
|
Loading…
Add table
Reference in a new issue