From e44dcce325d9c280caad88d36c9596f9ff5630d0 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 13 Oct 2008 09:58:38 +0000 Subject: Round the displayed percentages in polls. #32375 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9010 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index b0b7b946be..35b0d401ba 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -819,7 +819,7 @@ if (!empty($topic_data['poll_start'])) foreach ($poll_info as $poll_option) { $option_pct = ($poll_total > 0) ? $poll_option['poll_option_total'] / $poll_total : 0; - $option_pct_txt = sprintf("%.1d%%", ($option_pct * 100)); + $option_pct_txt = sprintf("%.1d%%", round($option_pct * 100)); $template->assign_block_vars('poll_option', array( 'POLL_OPTION_ID' => $poll_option['poll_option_id'], -- cgit v1.2.1