Changeset 526 for trunk/admin/xcache.php
- Timestamp:
- 2008-02-18T14:28:31+01:00 (5 years ago)
- File:
-
- 1 edited
-
trunk/admin/xcache.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/xcache.php
r522 r526 77 77 function freeblock_to_graph($freeblocks, $size) 78 78 { 79 global $ free_graph_width;79 global $graph_width, $usage_graph_width, $free_graph_width; 80 80 81 81 // cached in static variable 82 82 static $graph_initial; 83 83 if (!isset($graph_initial)) { 84 for ($i = 0; $i < $free_graph_width; $i ++) { 85 $graph_initial[$i] = 0; 86 } 84 $graph_initial = array_fill(0, $graph_width, 0); 87 85 } 88 86 $graph = $graph_initial; 89 87 foreach ($freeblocks as $b) { 90 $begin = $b['offset'] / $size * $ free_graph_width;91 $end = ($b['offset'] + $b['size']) / $size * $ free_graph_width;88 $begin = $b['offset'] / $size * $graph_width; 89 $end = ($b['offset'] + $b['size']) / $size * $graph_width; 92 90 93 91 if ((int) $begin == (int) $end) { … … 106 104 $c = 255; 107 105 foreach ($graph as $k => $v) { 106 if (!isset($free_graph_width)) { 107 $v = 1 - $v; 108 } 108 109 $v = (int) ($v * $c); 109 110 $r = $g = $c - $v;
Note: See TracChangeset
for help on using the changeset viewer.

