mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
PUSHPROD fix settings & LOG_PRINT
This commit is contained in:
@@ -46,7 +46,7 @@ function getParameter() {
|
||||
WHERE par_ID="'. quotes($_REQUEST['parameter']) .'"';
|
||||
|
||||
$result = $db->query($sql);
|
||||
$row = $result -> fetchArray (SQLITE3_NUM);
|
||||
$row = $result -> fetchArray (SQLITE3_NUM);
|
||||
$value = $row[0];
|
||||
|
||||
echo (json_encode ($value));
|
||||
|
||||
@@ -70,13 +70,12 @@ require '/home/pi/pialert/front/php/templates/language/'.$pia_lang_selected.'.ph
|
||||
$FUNCTION = [];
|
||||
$SETTINGS = [];
|
||||
|
||||
|
||||
if(array_search('function', $FUNCTION) != FALSE)
|
||||
{
|
||||
if(array_key_exists('function', $_REQUEST) != FALSE)
|
||||
{echo 'here'.$timestamp ;
|
||||
$FUNCTION = $_REQUEST['function'];
|
||||
}
|
||||
|
||||
if(array_search('function', $SETTINGS) != FALSE)
|
||||
if(array_key_exists('settings', $_REQUEST) != FALSE)
|
||||
{
|
||||
$SETTINGS = $_REQUEST['settings'];
|
||||
}
|
||||
@@ -211,7 +210,7 @@ function saveSettings()
|
||||
{
|
||||
global $SETTINGS, $FUNCTION, $config_file, $fullConfPath, $configFolderPath, $timestamp;
|
||||
|
||||
|
||||
echo 'here'.$timestamp ;
|
||||
|
||||
// save in the file
|
||||
$new_name = $config_file.'_'.$timestamp.'.backup';
|
||||
@@ -233,6 +232,8 @@ function saveSettings()
|
||||
// generate a clean pialert.conf file
|
||||
$groups = [];
|
||||
|
||||
$txt = "";
|
||||
|
||||
$txt = $txt."#-----------------AUTOGENERATED FILE-----------------#\n";
|
||||
$txt = $txt."# #\n";
|
||||
$txt = $txt."# Generated: ".$timestamp." #\n";
|
||||
@@ -299,7 +300,7 @@ function saveSettings()
|
||||
|
||||
displayMessage("<br/>Settings saved to the <code>".$config_file."</code> file.
|
||||
Backup of ".$config_file." created: <code>".$new_name."</code>.<br/>
|
||||
<b>Restart the container for the chanegs to take effect.</b>",
|
||||
<b>Restart the container for the changes to take effect.</b>",
|
||||
FALSE, TRUE, TRUE, TRUE);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user