From aceca4b66c02959b57ea777360dcb790c5b2ec74 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 6 Oct 2008 20:06:52 +0000 Subject: * Default to the restore page when a username is defined --- packages/autoconfigbackup/autoconfigbackup.php | 8 ++++++++ packages/autoconfigbackup/autoconfigbackup.xml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/autoconfigbackup/autoconfigbackup.php b/packages/autoconfigbackup/autoconfigbackup.php index 2574941a..1162bdb0 100644 --- a/packages/autoconfigbackup/autoconfigbackup.php +++ b/packages/autoconfigbackup/autoconfigbackup.php @@ -42,6 +42,14 @@ $get_url = "https://portal.pfsense.org/pfSconfigbackups/restore.php"; // Encryption password $decrypt_password = $config['installedpackages']['autoconfigbackup']['config']['decrypt_password']; +$username = $config['installedpackages']['autoconfigbackup']['config']['username']; +$password = $config['installedpackages']['autoconfigbackup']['config']['password']; + +if(!$username) { + Header("Location: /pkg_edit.php?xml=autoconfigbackup.xml&id=0"); + exit; +} + if($_GET['newver'] != "") { // Phone home and obtain backups $curl_Session = curl_init($get_url); diff --git a/packages/autoconfigbackup/autoconfigbackup.xml b/packages/autoconfigbackup/autoconfigbackup.xml index 7f1d2028..dd2371a1 100644 --- a/packages/autoconfigbackup/autoconfigbackup.xml +++ b/packages/autoconfigbackup/autoconfigbackup.xml @@ -46,7 +46,7 @@ AutoConfigBackup Set autoconfigbackup settings such as password and port.
Diagnostics
- /pkg_edit.php?xml=autoconfigbackup.xml&id=0 + /autoconfigbackup.php /usr/local/pkg/pf/ -- cgit v1.2.3