diff options
author | Renato Botelho <renato.botelho@bluepex.com> | 2010-08-12 12:34:00 -0300 |
---|---|---|
committer | Renato Botelho <renato.botelho@bluepex.com> | 2010-08-12 12:34:00 -0300 |
commit | 86aa4cc74efe0c2589e61aebf0b15a05f35d5a2b (patch) | |
tree | e5a0b9047dd3ec406ff69f1168d2405e3c096264 /usr | |
parent | c47e5d929b94100840e81c773880adefb6344bbb (diff) | |
download | pfsense-86aa4cc74efe0c2589e61aebf0b15a05f35d5a2b.zip pfsense-86aa4cc74efe0c2589e61aebf0b15a05f35d5a2b.tar.gz |
Small logic fixes, gettext fixes and make php -l happy
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/progress.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/local/www/progress.php b/usr/local/www/progress.php index a988d32..0a6b50d 100755 --- a/usr/local/www/progress.php +++ b/usr/local/www/progress.php @@ -12,7 +12,7 @@ else $url = 'progress.php?UPLOAD_IDENTIFIER='. $_GET["UPLOAD_IDENTIFIER"] .'&e=1'; function nice_value($x) { - if ($x < 100) $x; + if ($x < 100) return $x; if ($x < 10000) return sprintf("%.2fKB", $x/1000); if ($x < 900000) return sprintf("%dKB", $x/1000); return sprintf("%.2fMB", $x/1000/1000); @@ -27,6 +27,7 @@ if (!$X) { }else{ echo ('<HTML><meta HTTP-EQUIV="Refresh" CONTENT="1; url='. $url .'"><BODY></BODY></HTML>'); } + exit; } else { @@ -43,7 +44,9 @@ if (!$X) { if ($X['bytes_total'] > 1 && $X['bytes_uploaded'] >= $X['bytes_total'] && $X['est_sec'] == 0) { echo ('<HTML><BODY onLoad="window.close()"> ' . gettext("UPLOAD completed") . '!</BODY></HTML>'); - } else { + exit; + } +} ?> |