mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #977 from laf/issue-975
Added a new db field to record when custom high/low limits are set and stop them being overwrote
This commit is contained in:
@@ -21,7 +21,7 @@ if(!is_numeric($_POST['device_id']) || !is_numeric($_POST['sensor_id']) || (empt
|
||||
}
|
||||
else
|
||||
{
|
||||
$update = dbUpdate(array($_POST['value_type'] => $_POST['data']), 'sensors', '`sensor_id` = ? AND `device_id` = ?', array($_POST['sensor_id'],$_POST['device_id']));
|
||||
$update = dbUpdate(array($_POST['value_type'] => $_POST['data'], 'sensor_custom' => 'Yes'), 'sensors', '`sensor_id` = ? AND `device_id` = ?', array($_POST['sensor_id'],$_POST['device_id']));
|
||||
if(!empty($update) || $update == '0')
|
||||
{
|
||||
echo('success');
|
||||
|
Reference in New Issue
Block a user