mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Apply fixes from StyleCI (#12120)
This commit is contained in:
@@ -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($vars['alert_id'])) {
|
||||
if (! is_numeric($vars['alert_id'])) {
|
||||
echo 'ERROR: No alert selected';
|
||||
exit;
|
||||
} else {
|
||||
@@ -27,10 +27,10 @@ if (!is_numeric($vars['alert_id'])) {
|
||||
if ($alert_name) {
|
||||
$alert_msg_prefix .= ' ' . $alert_name;
|
||||
}
|
||||
if (!$alert_name) {
|
||||
if (! $alert_name) {
|
||||
$alert_msg_prefix .= ' id ' . $vars['alert_id'];
|
||||
}
|
||||
if (dbDelete('alert_rules', '`id` = ?', array($vars['alert_id']))) {
|
||||
if (dbDelete('alert_rules', '`id` = ?', [$vars['alert_id']])) {
|
||||
dbDelete('alert_device_map', 'rule_id=?', [$vars['alert_id']]);
|
||||
dbDelete('alert_group_map', 'rule_id=?', [$vars['alert_id']]);
|
||||
dbDelete('alert_location_map', 'rule_id=?', [$vars['alert_id']]);
|
||||
|
||||
Reference in New Issue
Block a user