diff options
author | Phil Davis <phil.davis@world.inf.org> | 2012-08-03 10:30:51 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@world.inf.org> | 2012-08-03 10:30:51 +0545 |
commit | 82acb8b327893fccc483325465d6390dcf059cd6 (patch) | |
tree | 8250b476f80bc241b0f8e0b65314d015142a115d /etc/inc/pfsense-utils.inc | |
parent | 665340db1142980ca40d49b9dddf1b07e07da3b8 (diff) | |
download | pfsense-82acb8b327893fccc483325465d6390dcf059cd6.zip pfsense-82acb8b327893fccc483325465d6390dcf059cd6.tar.gz |
Minor fix to percentage output on pkg install
A variable not changed in a cut-paste.
When on console, update_progress_bar should also only be called for 1-9 then every 10% progress, to reduce serial output volume.
Diffstat (limited to 'etc/inc/pfsense-utils.inc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index e736710..59522f1 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1690,7 +1690,7 @@ function read_body($ch, $string) { if(($downloadProgress % 10) == 0 || $downloadProgress < 10) { $tooutput = $static_output . $downloadProgress . "%"; if ($downloadProgress == 100) { - $tostatus = $tostatus . "\n"; + $tooutput = $tooutput . "\n"; } update_output_window($tooutput); } @@ -1699,7 +1699,9 @@ function read_body($ch, $string) { update_output_window($tooutput); } } - update_progress_bar($downloadProgress); + if(($pkg_interface != "console") || (($downloadProgress % 10) == 0) || ($downloadProgress < 10)) { + update_progress_bar($downloadProgress); + } $lastseen = $downloadProgress; } if($fout) @@ -1724,7 +1726,7 @@ function update_output_window($text) { } /* - * update_output_window: update top textarea dynamically. + * update_status: update top textarea dynamically. */ function update_status($status) { global $pkg_interface; |