From 7d7c3a53fbdf2a818db6a1001b79d265455d68a4 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Tue, 27 Nov 2001 00:24:57 +0000 Subject: [PATCH] Another Pauls up git-svn-id: file:///svn/phpbb/trunk@1459 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/profile.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/profile.php b/phpBB/profile.php index da95e749d7..ae481a9e41 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -248,10 +248,10 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) $posts_per_day = sprintf("%.2f", $profiledata['user_posts'] / $memberdays); // 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"); - $percentage = sprintf("%.2f", ($profiledata['user_posts'] / $total_posts) * 100); + $percentage = ( $total_posts ) ? sprintf("%.2f", ($profiledata['user_posts'] / $total_posts) * 100) : 0; } else { @@ -358,7 +358,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) $template->assign_vars(array( "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, "RANK_IMAGE" => $rank_image, "POSTS_PER_DAY" => $posts_per_day,