Apply fixes from StyleCI (#14899)

Co-authored-by: StyleCI Bot <bot@styleci.io>
This commit is contained in:
Jellyfrog
2023-03-13 22:32:22 +01:00
committed by GitHub
parent 0e322ae5d5
commit 68e0b3df28
220 changed files with 2050 additions and 2035 deletions

View File

@@ -58,7 +58,7 @@ $mute = isset($_POST['mute']) ? $_POST['mute'] : null;
$invert = isset($_POST['invert']) ? $_POST['invert'] : null;
$name = strip_tags($_POST['name']);
$proc = $_POST['proc'];
$recovery = ($vars['recovery']);
$recovery = $vars['recovery'];
$invert_map = isset($_POST['invert_map']) ? $_POST['invert_map'] : null;
$severity = $_POST['severity'];

View File

@@ -18,7 +18,7 @@ $action = $_POST['action'];
$name = strip_tags($_POST['name']);
$oid = strip_tags($_POST['oid']);
$datatype = strip_tags($_POST['datatype']);
if (! empty(($_POST['unit']))) {
if (! empty($_POST['unit'])) {
$unit = $_POST['unit'];
} else {
$unit = ['NULL'];
@@ -31,7 +31,7 @@ $alerts = ($_POST['alerts'] == 'on' ? 1 : 0);
$passed = ($_POST['passed'] == 'on' ? 1 : 0);
$divisor = set_numeric($_POST['divisor'], 1);
$multiplier = set_numeric($_POST['multiplier'], 1);
if (! empty(($_POST['user_func']))) {
if (! empty($_POST['user_func'])) {
$user_func = $_POST['user_func'];
} else {
$user_func = ['NULL'];

View File

@@ -17,7 +17,7 @@ if (! Auth::user()->hasGlobalAdmin()) {
exit('ERROR: You need to be admin');
}
$group_id = ($_POST['group_id']);
$group_id = $_POST['group_id'];
if (is_numeric($group_id) && $group_id > 0) {
$group = dbFetchRow('SELECT * FROM `poller_groups` WHERE `id` = ? LIMIT 1', [$group_id]);