pmik76 / rtgui

Automatically exported from code.google.com/p/rtgui
0 stars 0 forks source link

Little percentage bug #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Initial: "Disk Free: 101.8 GB / 147.9 GB (69%)"

After automatic refresh: "Disk Free: 101.8 GB (69%) / 147.9 GB (69%)"

Problem: There is a " (69%)" added to the first value. It's not supposed to
be there...

Original issue reported on code.google.com by andrei.s...@gmail.com on 14 Sep 2008 at 11:56

GoogleCodeExporter commented 9 years ago
index.php, line 70 should be changed from:

echo "   Disk Free: <span class='inline'
id='glob_diskfree'>".format_bytes($rates[0]['diskspace'])."</span> /
".format_bytes(disk_total_space($downloaddir))."
(".(round($rates[0]['diskspace']/disk_total_space($downloaddir)*100))."%)\n";

to:

echo "   Disk Free: <span class='inline'
id='glob_diskfree'>".format_bytes($rates[0]['diskspace'])."
(".(round($rates[0]['diskspace']/disk_total_space($downloaddir)*100))."%)</span>
 /
".format_bytes(disk_total_space($downloaddir))."\n";

Javascript is updating the span, while the initial percentage is outside of it; 
thus
the strange-ness.

Original comment by llamaXxX@gmail.com on 16 Sep 2008 at 2:43

GoogleCodeExporter commented 9 years ago
Yup - and thanks to Llama for supplying the fix to my bad code :)

Will be fixed in next version...

-Simon

Original comment by lemonbe...@gmail.com on 18 Sep 2008 at 6:05

GoogleCodeExporter commented 9 years ago
Fixed in 0.2.6

Original comment by lemonbe...@gmail.com on 5 Dec 2008 at 10:26