diff options
author | Chris Smith <toonarmy@phpbb.com> | 2008-10-13 09:58:38 +0000 |
---|---|---|
committer | Chris Smith <toonarmy@phpbb.com> | 2008-10-13 09:58:38 +0000 |
commit | e44dcce325d9c280caad88d36c9596f9ff5630d0 (patch) | |
tree | e51adf7b45e5fae26192cf7793e9811ce3f84620 /phpBB | |
parent | 9197c949463c7c2d4ebfaf32f7eed9cce786f6dd (diff) | |
download | forums-e44dcce325d9c280caad88d36c9596f9ff5630d0.tar forums-e44dcce325d9c280caad88d36c9596f9ff5630d0.tar.gz forums-e44dcce325d9c280caad88d36c9596f9ff5630d0.tar.bz2 forums-e44dcce325d9c280caad88d36c9596f9ff5630d0.tar.xz forums-e44dcce325d9c280caad88d36c9596f9ff5630d0.zip |
Round the displayed percentages in polls. #32375
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9010 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
-rw-r--r-- | phpBB/viewtopic.php | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index f70516e558..ef148704b4 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -142,6 +142,7 @@ <li>[Fix] Do not send PMs with warnings if the user cannot read PMs or they are disabled. (Bug #30815)</li> <li>[Fix] Correctly convert Neil's Birthday MOD to the date format used in phpBB3. (Bug #32895)</li> <li>[Fix] Parse BBCode lists of type square, circle and disc. (Bug #35295)</li> + <li>[Fix] Round the displayed percentages in polls. (Bug #32375)</li> <li>[Change] No longer allow the direct use of MULTI_INSERT in sql_build_array. sql_multi_insert() must be used.</li> <li>[Change] Display warning in ACP if config.php file is left writable.</li> 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'], |