From ff72fe0da9cf469a5e4d6344df8c2774c5ce7dca Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Sun, 18 Oct 2015 13:41:38 +0000 Subject: [PATCH] (Captiveportal, new) add some explanation about why we link to the config.xml in this case. We try to avoid reading directly from config.xml as much as possible, because most applications use their own config type and we rather render our data to that format. --- src/opnsense/scripts/OPNsense/CaptivePortal/fetch_template.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/opnsense/scripts/OPNsense/CaptivePortal/fetch_template.py b/src/opnsense/scripts/OPNsense/CaptivePortal/fetch_template.py index b0ca59286..39d8af6ce 100755 --- a/src/opnsense/scripts/OPNsense/CaptivePortal/fetch_template.py +++ b/src/opnsense/scripts/OPNsense/CaptivePortal/fetch_template.py @@ -45,7 +45,9 @@ with zipfile.ZipFile(output_data, mode='w', compression=zipfile.ZIP_DEFLATED) as # overlay user template data user_filenames = list() if len(sys.argv) > 1: - # search for user template, using fileid + # Search for user template, using fileid + # In this case, we must use the config.xml to retrieve the latest content. + # When using the generated config, the user experience will be a bit odd (old content after upload) cnf = OPNSenseConfig() template_content = cnf.get_template(sys.argv[1]) if template_content is not None: