diff options
author | Gregory Chalenko <gregory.chalenko@zabbix.com> | 2020-10-07 18:25:58 +0300 |
---|---|---|
committer | Gregory Chalenko <gregory.chalenko@zabbix.com> | 2020-10-07 18:25:58 +0300 |
commit | e42229d19a10223f27037d2253a78eb03840dac1 (patch) | |
tree | 0525f60577dd2568f6b93a662886e1375a75ffca /ui/app/controllers | |
parent | 56c597b7980f818abccc482e2faf34ed7f2372d2 (diff) |
..F....... [ZBXNEXT-710] minor coding style fix
Diffstat (limited to 'ui/app/controllers')
-rw-r--r-- | ui/app/controllers/CControllerHost.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ui/app/controllers/CControllerHost.php b/ui/app/controllers/CControllerHost.php index 5d4d1e99510..f2e6fbc645b 100644 --- a/ui/app/controllers/CControllerHost.php +++ b/ui/app/controllers/CControllerHost.php @@ -65,14 +65,12 @@ abstract class CControllerHost extends CController { * @return int */ protected function getCount(array $filter): int { - $groupids = $filter['groupids'] ? getSubGroups($filter['groupids']) : null; - return (int) API::Host()->get([ 'countOutput' => true, 'evaltype' => $filter['evaltype'], 'tags' => $filter['tags'], 'inheritedTags' => true, - 'groupids' => $groupids ? $groupids : null, + 'groupids' => $filter['groupids'] ? getSubGroups($filter['groupids']) : null, 'severities' => $filter['severities'] ? $filter['severities'] : null, 'withProblemsSuppressed' => $filter['severities'] ? (($filter['show_suppressed'] == ZBX_PROBLEM_SUPPRESSED_TRUE) ? null : false) @@ -115,15 +113,13 @@ abstract class CControllerHost extends CController { * @return array */ protected function getData(array $filter): array { - $groupids = $filter['groupids'] ? getSubGroups($filter['groupids'], $filter_groups) : null; - $limit = CSettingsHelper::get(CSettingsHelper::SEARCH_LIMIT) + 1; $hosts = API::Host()->get([ 'output' => ['hostid', 'name', 'status'], 'evaltype' => $filter['evaltype'], 'tags' => $filter['tags'], 'inheritedTags' => true, - 'groupids' => $groupids ? $groupids : null, + 'groupids' => $filter['groupids'] ? getSubGroups($filter['groupids']) : null, 'severities' => $filter['severities'] ? $filter['severities'] : null, 'withProblemsSuppressed' => $filter['severities'] ? (($filter['show_suppressed'] == ZBX_PROBLEM_SUPPRESSED_TRUE) ? null : false) |