minor change
This commit is contained in:
parent
7bfa78a3d5
commit
b7aca968a3
|
@ -894,7 +894,9 @@ function save_update_filter() {
|
|||
"id_extra": $("#text-id_extra").val(),
|
||||
"user_comment": $("#text-user_comment").val(),
|
||||
"id_source_event": $("#text-id_source_event").val(),
|
||||
"server_id": $("#server_id").val()
|
||||
"server_id": $("#server_id").val(),
|
||||
"custom_data": $("#text-custom_data").val(),
|
||||
"custom_data_filter_type": $("#custom_data_filter_type").val()
|
||||
|
||||
},
|
||||
function (data) {
|
||||
|
|
|
@ -1126,15 +1126,15 @@ function events_get_all(
|
|||
if (empty($filter['custom_data']) === false) {
|
||||
if ($filter['custom_data_filter_type'] === '1') {
|
||||
$sql_filters[] = sprintf(
|
||||
' AND JSON_VALID(custom_data) = 1 AND JSON_EXTRACT(custom_data, "$.*") LIKE lower("%%%s%%") ',
|
||||
$filter['custom_data'],
|
||||
$filter['custom_data']
|
||||
' AND JSON_VALID(custom_data) = 1
|
||||
AND (JSON_EXTRACT(custom_data, "$.*") LIKE lower("%%%s%%") COLLATE utf8mb4_0900_ai_ci) ',
|
||||
io_safe_output($filter['custom_data'])
|
||||
);
|
||||
} else {
|
||||
$sql_filters[] = sprintf(
|
||||
' AND JSON_VALID(custom_data) = 1 AND JSON_KEYS(custom_data) REGEXP "%s" ',
|
||||
$filter['custom_data'],
|
||||
$filter['custom_data']
|
||||
' AND JSON_VALID(custom_data) = 1
|
||||
AND (JSON_SEARCH(JSON_KEYS(custom_data), "all", lower("%%%s%%") COLLATE utf8mb4_0900_ai_ci) IS NOT NULL) ',
|
||||
io_safe_output($filter['custom_data'])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue