From 7af7a9e8a8843b0229e7bd69f67cd49f1989ab03 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Thu, 1 Jul 2010 19:50:14 -0400 Subject: fix backup/restore with alternate xmlrootobj --- usr/local/www/diag_backup.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php index bc30597..70df131 100755 --- a/usr/local/www/diag_backup.php +++ b/usr/local/www/diag_backup.php @@ -177,8 +177,8 @@ if ($_POST) { } } else { $rules = file_get_contents($_FILES['conffile']['tmp_name']); - if(stristr($rules, "pfsense") == false) { - $input_errors[] = "You have selected to restore the full configuration but we could not locate a pfsense tag."; + if(!stristr($rules, "<" . $g['xml_rootobj'] . ">")) { + $input_errors[] = "You have selected to restore the full configuration but we could not locate a " . $g['xml_rootobj'] . " tag."; } else { /* restore the entire configuration */ if (config_install($_FILES['conffile']['tmp_name']) == 0) { -- cgit v1.1