Commit:    c2b7b05b1c237ecfd281f7acf5f1e8f908a7205b
Author:    Sherif Ramadan <[email protected]>         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;
             }


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to