From 7b2165a1a055271cd05c2c4bc46d82e32d9a1d31 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Sun, 23 Aug 2015 13:50:18 +0200 Subject: autoconfigbackup.- code style fixes - Move custom_php_resync_config_command() function from XML to autoconfigbackup.inc and give it an unique prefix - Also give an unique prefix to custom_php_validation_command() --- config/autoconfigbackup/autoconfigbackup.inc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'config/autoconfigbackup') diff --git a/config/autoconfigbackup/autoconfigbackup.inc b/config/autoconfigbackup/autoconfigbackup.inc index dc69ab62..c7d4c97b 100644 --- a/config/autoconfigbackup/autoconfigbackup.inc +++ b/config/autoconfigbackup/autoconfigbackup.inc @@ -39,7 +39,7 @@ unlink_if_exists("/usr/local/pkg/parse_config/parse_config_upload.inc"); unlink_if_exists("/usr/local/pkg/parse_config/parse_config_upload.php"); // Ensures patches match -function custom_php_validation_command($post, &$input_errors) { +function acb_custom_php_validation_command($post, &$input_errors) { global $_POST, $savemsg, $config; if (!$post['username']) { @@ -73,6 +73,20 @@ function custom_php_validation_command($post, &$input_errors) { unset($_POST['testconnection']); } +function acb_custom_php_resync_config_command() { + conf_mount_rw(); + unlink_if_exists("/cf/conf/lastpfSbackup.txt"); + conf_mount_ro(); + if (!function_exists("filter_configure")) { + require_once("filter.inc"); + } + filter_configure(); + if ($savemsg) { + $savemsg .= "
"; + } + $savemsg .= "A configuration backup has been queued."; +} + function configure_proxy() { global $config; $ret = array(); -- cgit v1.2.3