Apply fixes from StyleCI (#12120)

This commit is contained in:
Jellyfrog
2020-09-21 15:40:17 +02:00
committed by GitHub
parent 77c531527c
commit 82f43cb98d
1733 changed files with 18337 additions and 18540 deletions

View File

@@ -14,11 +14,11 @@
header('Content-type: text/plain');
if (!Auth::user()->hasGlobalAdmin()) {
die('ERROR: You need to be admin');
if (! Auth::user()->hasGlobalAdmin()) {
exit('ERROR: You need to be admin');
}
if (!is_numeric($_POST['alert_id'])) {
if (! is_numeric($_POST['alert_id'])) {
echo 'ERROR: No alert selected';
exit;
} else {
@@ -30,8 +30,8 @@ if (!is_numeric($_POST['alert_id'])) {
$state = 1;
}
$update = dbUpdate(array('disabled' => $state), 'alert_rules', '`id`=?', array($_POST['alert_id']));
if (!empty($update) || $update == '0') {
$update = dbUpdate(['disabled' => $state], 'alert_rules', '`id`=?', [$_POST['alert_id']]);
if (! empty($update) || $update == '0') {
echo 'Alert rule has been updated.';
exit;
} else {