From df1e2be39f89e73620efe0ad2a898dfe70b1ea44 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 7 Dec 2008 20:49:33 +0000 Subject: * Handle nooverwrite correctly * Do not use filter_configure() to backup, call upload_config() --- packages/autoconfigbackup/autoconfigbackup.php | 9 +++------ packages/autoconfigbackup/autoconfigbackup_backup.php | 10 +++++----- 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'packages/autoconfigbackup') diff --git a/packages/autoconfigbackup/autoconfigbackup.php b/packages/autoconfigbackup/autoconfigbackup.php index 1c3d4265..3bb154fc 100644 --- a/packages/autoconfigbackup/autoconfigbackup.php +++ b/packages/autoconfigbackup/autoconfigbackup.php @@ -84,9 +84,7 @@ include("head.inc"); } if ($input_errors) print_input_errors($input_errors); - ?> -
-
- Loading, please wait... +
+ Loading, please wait...
EOF; - } else { $savemsg = "Unable to revert to the selected configuration."; } @@ -326,4 +323,4 @@ EOF; - + \ No newline at end of file diff --git a/packages/autoconfigbackup/autoconfigbackup_backup.php b/packages/autoconfigbackup/autoconfigbackup_backup.php index 4c51ec05..7617f688 100644 --- a/packages/autoconfigbackup/autoconfigbackup_backup.php +++ b/packages/autoconfigbackup/autoconfigbackup_backup.php @@ -27,7 +27,9 @@ POSSIBILITY OF SUCH DAMAGE. */ +require("globals.inc"); require("guiconfig.inc"); +require("/usr/local/pkg/autoconfigbackup.inc"); $pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); if(strstr($pfSversion, "1.2")) @@ -60,11 +62,9 @@ if(!$username) { } if($_POST) { - touch("/tmp/acb_nooverwrite"); - if($_REQUEST['reason']) - write_config($_REQUEST['reason']); - else - write_config("Backup invoked via Auto Config Backup."); + if($_REQUEST['nooverwrite']) + touch("/tmp/acb_nooverwrite"); + upload_config(); $savemsg = "Backup completed successfully."; exec("echo > /cf/conf/lastpfSbackup.txt"); filter_configure_sync(); -- cgit v1.2.3