ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/reports/php/latest/latest.php
(Generate patch)

Comparing projects/cms/source/reports/php/latest/latest.php (file contents):
Revision 1.39 by tdb, Sun May 19 21:09:57 2002 UTC vs.
Revision 1.40 by tdb, Sun May 19 21:15:29 2002 UTC

# Line 109 | Line 109 | function showBar($title, $value, $max, $units, $input,
109      if (!is_int($max)) {
110          $max = getPregMatch($max, $input);
111      }
112 <    if (!isset($value) || empty($max)) {
112 >    if (!isset($value) || !isset($max)) {
113          return;
114      }
115  
# Line 117 | Line 117 | function showBar($title, $value, $max, $units, $input,
117          $value = $max - $value;
118      }
119  
120 <    $width = intval($max_width * $value / $max);
121 <
122 <    if ($width < 1) {
120 >    if(empty($max)) {
121          $width = 1;
122 +    }
123 +    else {
124 +        $width = intval($max_width * $value / $max);
125 +        if ($width < 1) {
126 +            $width = 1;
127 +        }
128      }
129  
130      ?>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines