diff --git a/front/php/server/util.php b/front/php/server/util.php
index 9337901e..de7df32e 100755
--- a/front/php/server/util.php
+++ b/front/php/server/util.php
@@ -297,6 +297,13 @@ function saveSettings()
} elseif ($settingType == 'text.multiselect' || $settingType == 'subnets' || $settingType == 'list') {
$temp = '[';
+ echo $settingType.'
';
+ echo $settingKey.'
';
+ echo json_encode($settingValue).'
';
+ // echo json_decode($settingValue).'
';
+
+ // json_decode($settingValue) todo
+
if (count($setting) > 3 && is_array($settingValue) == true) {
foreach ($settingValue as $val) {
$temp .= "'" . encode_single_quotes($val) . "',";
@@ -323,7 +330,7 @@ function saveSettings()
$txt = $txt."#-------------------IMPORTANT INFO-------------------#\n";
// open new file and write the new configuration
- $newConfig = fopen($fullConfPath, "w") or die("Unable to open file!");
+ $newConfig = fopen($fullConfPath.'_debug', "w") or die("Unable to open file!"); // todo
fwrite($newConfig, $txt);
fclose($newConfig);
diff --git a/front/php/templates/footer.php b/front/php/templates/footer.php
index 51211e5c..c7dd79c3 100755
--- a/front/php/templates/footer.php
+++ b/front/php/templates/footer.php
@@ -13,22 +13,14 @@
©
-
-
- 2020 Puche (2022+
jokob-sk) |
Built on:
+ 2020 Puche (2022+
jokob-sk) |
= lang('Maintenance_built_on');?>:
-
+
|
Version:
- release notes.",
"Maintenance_current_version" : "You are up-to-date. Check out what
I am working on.",
+ "Maintenance_built_on" : "Built on",
"Maintenance_database_path" : "Database-Path",
"Maintenance_database_size" : "Database-Size",
"Maintenance_database_rows" : "Table (Rows)",
diff --git a/front/settings.php b/front/settings.php
index 5a7a5ee6..365cec67 100755
--- a/front/settings.php
+++ b/front/settings.php
@@ -439,14 +439,8 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
const temp = $(`#${set["Code_Name"]}`).is(':checked') ? 1 : 0;
settingsArray.push([set["Group"], set["Code_Name"], set["Type"], temp]);
-
- } else if (set['Code_Name'] === 'SCAN_SUBNETS') {
- const temps = [];
- $('#SCAN_SUBNETS option').each(function (i, selected) {
- temps.push($(selected).val());
- });
- settingsArray.push([set["Group"], set["Code_Name"], set["Type"], JSON.stringify(temps)]);
- } else if (set['Type'] === 'list') {
+
+ } else if (set['Type'] === 'list' || set['Type'] === 'subnets') {
const temps = [];
$(`#${set["Code_Name"]} option`).each(function (i, selected) {
const vl = $(selected).val();
diff --git a/pialert/initialise.py b/pialert/initialise.py
index 0783153e..ca161693 100755
--- a/pialert/initialise.py
+++ b/pialert/initialise.py
@@ -248,9 +248,6 @@ def importConfigs (db):
sql.executemany ("""INSERT INTO Settings ("Code_Name", "Display_Name", "Description", "Type", "Options",
"RegEx", "Value", "Group", "Events" ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)""", conf.mySettingsSQLsafe)
- # Used to determine the next import
- conf.lastTimeImported = time.time()
-
# Is used to display a message in the UI when old (outdated) settings are loaded
initOrSetParam(db, "Back_Settings_Imported",(round(time.time() * 1000),) )
@@ -259,6 +256,10 @@ def importConfigs (db):
# update only the settings datasource
update_api(db, False, ["settings"])
+
+ # Used to determine the next import
+ conf.lastTimeImported = time.time()
+
#TO DO this creates a circular reference between API and HELPER !
mylog('info', '[Config] Imported new config')