com web/master: Fixed precision on percentage or rating for notes search.: manage/user-notes.php
| From: | Sherif Ramadan | Date: | Tue, 25 Dec 2012 07:06:28 +0000 |
| Subject: | com web/master: Fixed precision on percentage or rating for notes search.: manage/user-notes.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-15145@lists.php.net to get a copy of this message | ||
Commit: c2b7b05b1c237ecfd281f7acf5f1e8f908a7205b
Author: Sherif Ramadan <googleguy@php.net> Tue, 25 Dec 2012 02:06:28 -0500
Parents: a1f89f36cf8a3c77ae5c8b788b749913e4c07213
Branches: master
Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=c2b7b05b1c237ecfd281f7acf5f1e8f908a7205b
Log:
Fixed precision on percentage or rating for notes search.
Changed paths:
M manage/user-notes.php
Diff:
diff --git a/manage/user-notes.php b/manage/user-notes.php
index b94db6a..b5b6272 100644
--- a/manage/user-notes.php
+++ b/manage/user-notes.php
@@ -281,7 +281,7 @@ if (!$action) {
$percentage = $row['rate'];
} else {
if ($row['up'] + $row['down']) { // prevents division by zero
warning
- $percentage = $row['up'] / ($row['up'] +$row['down']);
+ $percentage = round(($row['up'] / ($row['up']
+$row['down'])) * 100);
} else {
$precentage = 0;
}