aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2008-11-13 13:04:54 +0000
committerChris Smith <toonarmy@phpbb.com>2008-11-13 13:04:54 +0000
commitef0c0d4c82dadfb856357f6ae906263420d84791 (patch)
treeb3df38203ab6a4f77e493bd9eb74623655e23ce9 /phpBB/viewtopic.php
parent1739da933574ff2cd68120d7c6ac0dae914943a6 (diff)
downloadforums-ef0c0d4c82dadfb856357f6ae906263420d84791.tar
forums-ef0c0d4c82dadfb856357f6ae906263420d84791.tar.gz
forums-ef0c0d4c82dadfb856357f6ae906263420d84791.tar.bz2
forums-ef0c0d4c82dadfb856357f6ae906263420d84791.tar.xz
forums-ef0c0d4c82dadfb856357f6ae906263420d84791.zip
been a while :( ... merge in r8997, r8998, r8999, r9000, r9001, r9002, r9003, r9004, r9005, r9007, r9008, r9009, r9010, r9011, r9012, r9013, r9014, r9015, r9022, r9023, r9029, r9030, r9034, r9048, r9049, r9054, r9056
git-svn-id: file:///svn/phpbb/trunk@9064 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 307a8c0854..de64de5734 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -446,7 +446,7 @@ if ($hilit_words)
}
// Make sure $start is set to the last page if it exceeds the amount
-if ($start < 0 || $start > $total_posts)
+if ($start < 0 || $start >= $total_posts)
{
$start = ($start < 0) ? 0 : floor(($total_posts - 1) / $config['posts_per_page']) * $config['posts_per_page'];
}
@@ -820,7 +820,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'],