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:
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
if (Auth::user()->hasGlobalRead()) {
|
||||
$data['count'] = array('query' => "SELECT COUNT(`toner_id`) FROM toner");
|
||||
$data['count'] = ['query' => "SELECT COUNT(`toner_id`) FROM toner"];
|
||||
} else {
|
||||
$device_ids = Permissions::devicesForUser()->toArray() ?: [0];
|
||||
$perms_sql = "`toner`.`device_id` IN " .dbGenPlaceholders(count($device_ids));
|
||||
$perms_sql = "`toner`.`device_id` IN " . dbGenPlaceholders(count($device_ids));
|
||||
|
||||
$data['count'] = array(
|
||||
$data['count'] = [
|
||||
'query' => "SELECT COUNT(`toner_id`) FROM toner WHERE $perms_sql",
|
||||
'params' => $device_ids
|
||||
);
|
||||
'params' => $device_ids,
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user