round scores and ratings in forum to avoid stuff like 2.99999999999

svn path=/trunk/boinc/; revision=5004
This commit is contained in:
Janus B. Kristensen 2005-01-06 18:48:07 +00:00
parent da2f822eb9
commit 563022c4cd
2 changed files with 5 additions and 2 deletions

View File

@ -22102,7 +22102,10 @@ Janus 6 Jan 2005
column:
ALTER TABLE `forum_preferences` ADD `ignorelist` VARCHAR( 254 ) NOT NULL ;
Added thread name to page title in forums (from Athlonrob)
- Added thread name to page title in forums (from Athlonrob)
- Round scores and ratings in forum to avoid a rating of
for instance 2.999999999
/html/user
edit_forum_preferences_form.php

View File

@ -588,7 +588,7 @@ function show_post($post, $thread, $logged_in_user, $n, $controls=FORUM_CONTROLS
} else if ($controls == HELPDESK_CONTROLS && !$separate) {
echo " / Score: ", ($post->score * $post->votes), "</i></font></td>";
} else {
echo " / Rating: ", intval(($post->score * $post->votes)+0.01), "</i> - rate: <a href=\"forum_rate.php?post=".$post->id."&amp;choice=p\">+</a> / <a href=\"forum_rate.php?post=".$post->id."&amp;choice=n\">-</a></font></td>";
echo " / Rating: ", round(intval(($post->score * $post->votes)+0.01),0), "</i> - rate: <a href=\"forum_rate.php?post=".$post->id."&amp;choice=p\">+</a> / <a href=\"forum_rate.php?post=".$post->id."&amp;choice=n\">-</a></font></td>";
}
if ($controls == FORUM_CONTROLS) {