bug-827 changed behaviour of awarded=null
authordirk <beliebige_email_adresse@fidocon.de>
Mon, 19 Sep 2011 23:22:32 +0000 (01:22 +0200)
committerdirk <beliebige_email_adresse@fidocon.de>
Mon, 19 Sep 2011 23:22:32 +0000 (01:22 +0200)
includes/wot.inc.php

index 2f12c01..dc75899 100644 (file)
 
        function calc_points($row)
        {
-               if (intval($row['points']) < intval($row['awarded']))
-                       $points = intval($row['awarded']);      // if 'sum of added points' > 100, awarded shows correct value
+               $awarded = intval($row['awarded']);
+               if ($awarded == "")
+                       $awarded = 0;
+               if (intval($row['points']) < $awarded)
+                       $points = $awarded;      // if 'sum of added points' > 100, awarded shows correct value
                else
                        $points = intval($row['points']);       // on very old assurances, awarded is '0' instead of correct value
                switch ($row['method'])