From 4b805dbc93a3d5171bb15c59a4e2f13e3d91a747 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Wed, 27 Feb 2013 07:55:34 -0300 Subject: Fix whitespaces, indent and unclosed html tags --- usr/local/www/system_firmware.php | 82 +++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 41 deletions(-) (limited to 'usr/local/www/system_firmware.php') diff --git a/usr/local/www/system_firmware.php b/usr/local/www/system_firmware.php index ff80bd3..794a247 100755 --- a/usr/local/www/system_firmware.php +++ b/usr/local/www/system_firmware.php @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. */ /* - pfSense_BUILDER_BINARIES: /usr/bin/tar + pfSense_BUILDER_BINARIES: /usr/bin/tar pfSense_MODULE: firmware */ @@ -68,11 +68,11 @@ function file_is_for_platform($filename, $ul_name) { if(stristr($ul_name, "nanobsd")) return true; else - return false; + return false; } $_gb = exec("/usr/bin/tar xzf $filename -C /tmp/ etc/platform"); unset($_gb); - if(!file_exists("/tmp/etc/platform")) + if(!file_exists("/tmp/etc/platform")) return false; $upgrade_is_for_platform = trim(file_get_contents("/tmp/etc/platform", " \n\t\r")); if ($g['platform'] == $upgrade_is_for_platform) { @@ -83,24 +83,24 @@ function file_is_for_platform($filename, $ul_name) { } function file_upload_error_message($error_code) { - switch ($error_code) { - case UPLOAD_ERR_INI_SIZE: - return gettext('The uploaded file exceeds the upload_max_filesize directive in php.ini'); - case UPLOAD_ERR_FORM_SIZE: - return gettext('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form'); - case UPLOAD_ERR_PARTIAL: - return gettext('The uploaded file was only partially uploaded'); - case UPLOAD_ERR_NO_FILE: - return gettext('No file was uploaded'); - case UPLOAD_ERR_NO_TMP_DIR: - return gettext('Missing a temporary folder'); - case UPLOAD_ERR_CANT_WRITE: - return gettext('Failed to write file to disk'); - case UPLOAD_ERR_EXTENSION: - return gettext('File upload stopped by extension'); - default: - return gettext('Unknown upload error'); - } + switch ($error_code) { + case UPLOAD_ERR_INI_SIZE: + return gettext('The uploaded file exceeds the upload_max_filesize directive in php.ini'); + case UPLOAD_ERR_FORM_SIZE: + return gettext('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form'); + case UPLOAD_ERR_PARTIAL: + return gettext('The uploaded file was only partially uploaded'); + case UPLOAD_ERR_NO_FILE: + return gettext('No file was uploaded'); + case UPLOAD_ERR_NO_TMP_DIR: + return gettext('Missing a temporary folder'); + case UPLOAD_ERR_CANT_WRITE: + return gettext('Failed to write file to disk'); + case UPLOAD_ERR_EXTENSION: + return gettext('File upload stopped by extension'); + default: + return gettext('Unknown upload error'); + } } /* if upgrade in progress, alert user */ @@ -118,7 +118,7 @@ if(is_subsystem_dirty('firmwarelock')) { exit; } -if($_POST['backupbeforeupgrade']) +if($_POST['backupbeforeupgrade']) touch("/tmp/perform_full_backup.txt"); if ($_POST['kerneltype'] && in_array($_POST['kerneltype'], array_keys($kerneltypes))) @@ -126,7 +126,7 @@ if ($_POST['kerneltype'] && in_array($_POST['kerneltype'], array_keys($kerneltyp /* Handle manual upgrade */ if ($_POST && !is_subsystem_dirty('firmwarelock')) { - + unset($input_errors); unset($sig_warning); @@ -149,7 +149,7 @@ if ($_POST && !is_subsystem_dirty('firmwarelock')) { clear_subsystem_dirty('firmware'); } else if ($mode == "upgrade") { if ($_FILES['ulfile']['error']) - $errortext = "(" . file_upload_error_message($_FILES['ulfile']['error']) . ")"; + $errortext = "(" . file_upload_error_message($_FILES['ulfile']['error']) . ")"; if (is_uploaded_file($_FILES['ulfile']['tmp_name'])) { /* verify firmware image(s) */ if (file_is_for_platform($_FILES['ulfile']['tmp_name'], $_FILES['ulfile']['name']) == false && !$_POST['sig_override']) @@ -211,7 +211,7 @@ $pgtitle = array(gettext("System"),gettext("Firmware")); include("head.inc"); ?> - +
- + @@ -258,12 +258,12 @@ if(stristr($_FILES['ulfile']['name'],"nanobsd"))
- + - - + - - + -- cgit v1.1
  +   "> @@ -271,24 +271,24 @@ if(stristr($_FILES['ulfile']['name'],"nanobsd"))
- "> + ">
  -   + + $type = "*.tgz"; + ?>
"; foreach($kerneltypes as $kerntype => $kerndescr) { @@ -321,8 +321,8 @@ if(stristr($_FILES['ulfile']['name'],"nanobsd")) + "has started. The firewall will reboot automatically after " . + "storing the new firmware. The configuration will be maintained.");?>