"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ui/app/controllers/CControllerPopupValueMapUpdate.php" between
zabbix-5.4.2.tar.gz and zabbix-5.4.3.tar.gz

About: ZABBIX is an enterprise-class distributed monitoring solution for servers and applications.

CControllerPopupValueMapUpdate.php  (zabbix-5.4.2):CControllerPopupValueMapUpdate.php  (zabbix-5.4.3)
skipping to change at line 97 skipping to change at line 97
if ($type != VALUEMAP_MAPPING_TYPE_DEFAULT && $value === '' && $mapping['newvalue'] === '') { if ($type != VALUEMAP_MAPPING_TYPE_DEFAULT && $value === '' && $mapping['newvalue'] === '') {
continue; continue;
} }
if ($mapping['newvalue'] === '') { if ($mapping['newvalue'] === '') {
error(_s('Incorrect value for field "%1$s": %2$s. ', _('Mapped to'), _('cannot be empty'))); error(_s('Incorrect value for field "%1$s": %2$s. ', _('Mapped to'), _('cannot be empty')));
return false; return false;
} }
elseif ($type == VALUEMAP_MAPPING_TYPE_REGEXP elseif ($type == VALUEMAP_MAPPING_TYPE_REGEXP) {
&& @preg_match('/'.str_replace('/', '\/', if ($value === '') {
$value).'/', '') === false) { error(_s('Incorrect value for field "%1$s
error(_s('Incorrect value for field "%1$s": %2$s. ": %2$s.', _('Value'), _('cannot be empty')));
', _('Value'), _('invalid regular expression')));
return false; return false;
}
elseif (@preg_match('/'.str_replace('/', '\/', $v
alue).'/', '') === false) {
error(_s('Incorrect value for field "%1$s
": %2$s.', _('Value'), _('invalid regular expression')));
return false;
}
} }
elseif ($type == VALUEMAP_MAPPING_TYPE_IN_RANGE && $range elseif ($type == VALUEMAP_MAPPING_TYPE_IN_RANGE) {
_parser->parse($value) != CParser::PARSE_SUCCESS) { if ($value === '') {
error(_s('Incorrect value for field "%1$s": %2$s. error(_s('Incorrect value for field "%1$s
', _('Value'), ": %2$s.', _('Value'), _('cannot be empty')));
_('invalid range expression')
));
return false; return false;
}
elseif ($range_parser->parse($value) != CParser::
PARSE_SUCCESS) {
error(_s('Incorrect value for field "%1$s
": %2$s.', _('Value'), _('invalid range expression')));
return false;
}
} }
elseif ($type == VALUEMAP_MAPPING_TYPE_LESS_EQUAL || $typ e == VALUEMAP_MAPPING_TYPE_GREATER_EQUAL) { elseif ($type == VALUEMAP_MAPPING_TYPE_LESS_EQUAL || $typ e == VALUEMAP_MAPPING_TYPE_GREATER_EQUAL) {
if ($number_parser->parse($value) != CParser::PAR SE_SUCCESS) { if ($number_parser->parse($value) != CParser::PAR SE_SUCCESS) {
error(_s('Incorrect value for field "%1$s ": %2$s.', _('Value'), error(_s('Incorrect value for field "%1$s ": %2$s.', _('Value'),
_('a floating point value is expe cted') _('a floating point value is expe cted')
)); ));
return false; return false;
} }
 End of changes. 4 change blocks. 
13 lines changed or deleted 26 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)