summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@dds.nl>2012-08-02 01:10:36 -0700
committerSeth Mos <seth.mos@dds.nl>2012-08-02 01:10:36 -0700
commit6675b01abea47da81f6e0bf0f1bde1d3f7009ded (patch)
tree64c702bc4c515641d250d44a601a6053b62966bd
parentf7c8f633b608ff30e63ff202567a93e15abb72f0 (diff)
parent2a315bee5d853c47864a774bfd80e057f49082db (diff)
downloadpfsense-6675b01abea47da81f6e0bf0f1bde1d3f7009ded.zip
pfsense-6675b01abea47da81f6e0bf0f1bde1d3f7009ded.tar.gz
Merge pull request #198 from phil-davis/master
Tidy up percentage logging to console
-rw-r--r--etc/inc/pfsense-utils.inc10
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index e871cbc..e736710 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1674,8 +1674,11 @@ function read_body($ch, $string) {
if($lastseen <> $downloadProgress and $downloadProgress < 101) {
if($sendto == "status") {
if($pkg_interface == "console") {
- if(substr($downloadProgress,2,1) == "0" || count($downloadProgress) < 2) {
+ if(($downloadProgress % 10) == 0 || $downloadProgress < 10) {
$tostatus = $static_status . $downloadProgress . "%";
+ if ($downloadProgress == 100) {
+ $tostatus = $tostatus . "\n";
+ }
update_status($tostatus);
}
} else {
@@ -1684,8 +1687,11 @@ function read_body($ch, $string) {
}
} else {
if($pkg_interface == "console") {
- if(substr($downloadProgress,2,1) == "0" || count($downloadProgress) < 2) {
+ if(($downloadProgress % 10) == 0 || $downloadProgress < 10) {
$tooutput = $static_output . $downloadProgress . "%";
+ if ($downloadProgress == 100) {
+ $tostatus = $tostatus . "\n";
+ }
update_output_window($tooutput);
}
} else {
OpenPOWER on IntegriCloud