Apply fixes from StyleCI (#12124)

This commit is contained in:
Jellyfrog
2020-09-21 15:59:34 +02:00
committed by GitHub
parent 0d56bbd946
commit 29f45ca352
816 changed files with 5038 additions and 5038 deletions

View File

@@ -35,17 +35,17 @@ if (isset($_POST['sub_type']) && ! empty($_POST['sub_type'])) {
}
} else {
if (! is_numeric($_POST['device_id']) || ! is_numeric($_POST['sensor_id'])) {
$message = "Invalid device or sensor id";
$message = 'Invalid device or sensor id';
} else {
if ($_POST['state'] == 'true') {
$state = 1;
$state_string = "enabled";
$state_string = 'enabled';
} elseif ($_POST['state'] == 'false') {
$state = 0;
$state_string = "disabled";
$state_string = 'disabled';
} else {
$state = 0;
$state_string = "disabled";
$state_string = 'disabled';
}
if (dbUpdate(['sensor_alert' => $state], 'sensors', '`sensor_id` = ? AND `device_id` = ?', [$_POST['sensor_id'], $_POST['device_id']]) >= 0) {
$status = ($state == 0) ? 'info' : 'ok';