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

@@ -22,19 +22,18 @@
* @copyright 2017 Tony Murray
* @author Tony Murray <murraytony@gmail.com>
*/
if (!Auth::user()->hasGlobalAdmin()) {
$status = array('status' =>1, 'message' => 'ERROR: You need to be admin to delete poller entries');
if (! Auth::user()->hasGlobalAdmin()) {
$status = ['status' =>1, 'message' => 'ERROR: You need to be admin to delete poller entries'];
} else {
$id = $vars['id'];
if (!is_numeric($id)) {
$status = array('status' =>1, 'message' => 'No poller has been selected');
if (! is_numeric($id)) {
$status = ['status' =>1, 'message' => 'No poller has been selected'];
} else {
$poller_name = dbFetchCell('SELECT `poller_name` FROM `pollers` WHERE `id`=?', array($id));
if (dbDelete('pollers', 'id=?', array($id))) {
$status = array('status' => 0, 'message' => "Poller: <i>$poller_name ($id), has been deleted.</i>");
$poller_name = dbFetchCell('SELECT `poller_name` FROM `pollers` WHERE `id`=?', [$id]);
if (dbDelete('pollers', 'id=?', [$id])) {
$status = ['status' => 0, 'message' => "Poller: <i>$poller_name ($id), has been deleted.</i>"];
} else {
$status = array('status' => 1, 'message' => "Poller: <i>$poller_name ($id), has NOT been deleted.</i>");
$status = ['status' => 1, 'message' => "Poller: <i>$poller_name ($id), has NOT been deleted.</i>"];
}
}
}