diff options
author | Scott Ullrich <sullrich@gmail.com> | 2011-09-25 22:34:18 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@gmail.com> | 2011-09-25 22:34:18 -0400 |
commit | e70f748f35e7f9a4e68a24e9e38f488ab2b04175 (patch) | |
tree | d68407b08f928772893b7d8847e8e975efebb4cf /usr/local/www/system_firmware_restorefullbackup.php | |
parent | d337fd0e8ab9e68438a24ffbfd0d009f69897979 (diff) | |
download | pfsense-e70f748f35e7f9a4e68a24e9e38f488ab2b04175.zip pfsense-e70f748f35e7f9a4e68a24e9e38f488ab2b04175.tar.gz |
Use format_bytes()
Diffstat (limited to 'usr/local/www/system_firmware_restorefullbackup.php')
-rwxr-xr-x | usr/local/www/system_firmware_restorefullbackup.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr/local/www/system_firmware_restorefullbackup.php b/usr/local/www/system_firmware_restorefullbackup.php index 1641a1c..a7ac446 100755 --- a/usr/local/www/system_firmware_restorefullbackup.php +++ b/usr/local/www/system_firmware_restorefullbackup.php @@ -32,7 +32,7 @@ */ /* - pfSense_BUILDER_BINARIES: /sbin/shutdown + pfSense_BUILDER_BINARIES: /etc/rc.restore_full_backup pfSense_MODULE: backup */ @@ -49,7 +49,7 @@ ini_set('max_input_time', '0'); /* omit no-cache headers because it confuses IE with file downloads */ $omit_nocacheheaders = true; -$nocsrf = true; + require("guiconfig.inc"); require_once("functions.inc"); require_once("filter.inc"); @@ -58,6 +58,10 @@ require_once("shaper.inc"); if($_POST['overwriteconfigxml']) touch("/tmp/do_not_restore_config.xml"); +if ($_GET['backupnow']) { + mwexec_bg("/etc/rc.create_full_backup"); +} + if ($_GET['deletefile']) { $filename = $_GET['deletefile']; if(file_exists("/root/{$filename}")) { @@ -128,7 +132,7 @@ include("head.inc"); echo date ("F d Y H:i:s.", filemtime($arf)); echo "</td>"; echo "<td class='listr' width='40%' colspan='1'>"; - echo $size; + echo format_bytes($size); echo "</td>"; echo "<td class='listr' width='10%' colspan='1'>"; echo "<a onclick=\"return confirm('" . gettext("Do you really want to delete this item?") . "')\" href='system_firmware_restorefullbackup.php?deletefile=" . htmlspecialchars($arf) . "'>"; |