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:
authorVladimirs Maksimovs <vladimirs.maksimovs@zabbix.com>2020-07-06 09:31:59 +0300
committerVladimirs Maksimovs <vladimirs.maksimovs@zabbix.com>2020-07-06 09:31:59 +0300
commitf3a39b8b4b897d668d5bbc553c40e4cbd4b726ba (patch)
tree41282fc62494f3b348dba53306a4c0380f845508 /ui/app/controllers/CControllerTrigDisplayUpdate.php
parentf605c13d7f32b9641686e9d14670ed757ca8ebd6 (diff)
A.F....... [ZBXNEXT-82] implemented helpers parameters usage in Aministration -> General -> Other page; fixed wrong validation and preserving for settings.update API method
Diffstat (limited to 'ui/app/controllers/CControllerTrigDisplayUpdate.php')
-rw-r--r--ui/app/controllers/CControllerTrigDisplayUpdate.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/app/controllers/CControllerTrigDisplayUpdate.php b/ui/app/controllers/CControllerTrigDisplayUpdate.php
index 0e2220aae03..3c33af3cd6d 100644
--- a/ui/app/controllers/CControllerTrigDisplayUpdate.php
+++ b/ui/app/controllers/CControllerTrigDisplayUpdate.php
@@ -23,7 +23,8 @@ class CControllerTrigDisplayUpdate extends CController {
protected function checkInput() {
$fields = [
- 'custom_color' => 'required|db config.custom_color|in '.EVENT_CUSTOM_COLOR_DISABLED.','.EVENT_CUSTOM_COLOR_ENABLED,
+ 'custom_color' => 'required|db config.custom_color|in '.EVENT_CUSTOM_COLOR_DISABLED.','.
+ EVENT_CUSTOM_COLOR_ENABLED,
'problem_unack_color' => 'db config.problem_unack_color|rgb',
'problem_ack_color' => 'db config.problem_ack_color|rgb',
'ok_unack_color' => 'db config.ok_unack_color|rgb',
@@ -77,10 +78,9 @@ class CControllerTrigDisplayUpdate extends CController {
];
foreach ($fields as $field => $args) {
- if ($this->hasInput($field)
- && !validateTimeUnit($this->getInput($field), $args['min'], $args['max'], $args['allow_zero'],
- $error
- )) {
+ if (!validateTimeUnit($this->getInput($field), $args['min'], $args['max'], $args['allow_zero'],
+ $error
+ )) {
error(sprintf($args['message'], $error));
$ret = false;