Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Chalenko <gregory.chalenko@zabbix.com>2020-09-04 11:40:30 +0300
committerGregory Chalenko <gregory.chalenko@zabbix.com>2020-09-04 11:40:30 +0300
commit2f261f6f7d8430cfd93086fa0e1f803b78c886d9 (patch)
tree256f4ae804c14d1c5a90508ccdc72978277f6041 /ui/app/controllers/CControllerHost.php
parent9fd8a48dfd5ea64f295db1c7fecf7155e6f7a482 (diff)
..F....... [ZBXNEXT-710] coding style fixes
Diffstat (limited to 'ui/app/controllers/CControllerHost.php')
-rw-r--r--ui/app/controllers/CControllerHost.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/ui/app/controllers/CControllerHost.php b/ui/app/controllers/CControllerHost.php
index a871fd962ce..6d6b5f874bd 100644
--- a/ui/app/controllers/CControllerHost.php
+++ b/ui/app/controllers/CControllerHost.php
@@ -353,4 +353,21 @@ abstract class CControllerHost extends CController {
return $data;
}
+
+ /**
+ * Clean passed filter fields in input from default values required for HTML presentation. Convert field
+ *
+ * @param array $input Filter fields values.
+ *
+ * @return array
+ */
+ protected function cleanInput(array $input): array {
+ if ($input['tags']) {
+ $input['tags'] = array_filter($input['tags'], function($tag) {
+ return $tag['tag'] !== '' && $tag['value'] !== '';
+ });
+ }
+
+ return $input;
+ }
}