diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-07-04 15:59:57 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-07-04 15:59:57 -0400 |
commit | 144420334464acd2d12f06bc1693fa3f9aa5086f (patch) | |
tree | cfe6907d618688930f7674485c783e05cc3c0d2d /usr/local/www/system_firmware.php | |
parent | b6b87fef6ec0e5d5188c9897bcc74b53300a5d3d (diff) | |
download | pfsense-144420334464acd2d12f06bc1693fa3f9aa5086f.zip pfsense-144420334464acd2d12f06bc1693fa3f9aa5086f.tar.gz |
Pass along php error number if it happens. New in 5.3. Lovely.
Diffstat (limited to 'usr/local/www/system_firmware.php')
-rwxr-xr-x | usr/local/www/system_firmware.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/local/www/system_firmware.php b/usr/local/www/system_firmware.php index c78a128..8b7a95c 100755 --- a/usr/local/www/system_firmware.php +++ b/usr/local/www/system_firmware.php @@ -97,6 +97,8 @@ if ($_POST && !is_subsystem_dirty('firmwarelock')) { conf_mount_ro(); clear_subsystem_dirty('firmware'); } else if ($mode == "upgrade") { + if($_FILES['ulfile']['error']) + $errortext = "Error ({$_FILES['ulfile']['error']})"; if (is_uploaded_file($_FILES['ulfile']['tmp_name'])) { /* verify firmware image(s) */ if (!stristr($_FILES['ulfile']['name'], $g['platform']) && !$_POST['sig_override']) @@ -133,7 +135,7 @@ if ($_POST && !is_subsystem_dirty('firmwarelock')) { if (!$input_errors && !is_subsystem_dirty('firmwarelock') && (!$sig_warning || $_POST['sig_override'])) { if (file_exists("{$g['upload_path']}/firmware.tgz")) { /* fire up the update script in the background */ - mark_subsystem_dirty('firmwarelock'); + mark_subsystem_dirty('firmwarelock'); $savemsg = "The firmware is now being updated. The firewall will reboot automatically."; if(stristr($_FILES['ulfile']['name'],"nanobsd")) mwexec_bg("/etc/rc.firmware pfSenseNanoBSDupgrade {$g['upload_path']}/firmware.tgz"); @@ -142,7 +144,7 @@ if ($_POST && !is_subsystem_dirty('firmwarelock')) { else mwexec_bg("/etc/rc.firmware pfSenseupgrade {$g['upload_path']}/firmware.tgz"); } else { - $savemsg = "Firmware image missing or other error, please try again."; + $savemsg = "Firmware image missing or other error, please try again {$errortext}."; } } } |