2014-07-09 Junichi Satoh <junichi@rworks.jp>

* include/functions_events.php, operation/events/events.php,
	operation/events/events_list.php: Replaced json_encode()
	with io_json_mb_encode() to avoid invalid encoding with multi-byte
	characters.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10328 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
jsatoh 2014-07-09 05:08:55 +00:00
parent dc8ff30972
commit 2233e99edf
4 changed files with 15 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2014-07-09 Junichi Satoh <junichi@rworks.jp>
* include/functions_events.php, operation/events/events.php,
operation/events/events_list.php: Replaced json_encode()
with io_json_mb_encode() to avoid invalid encoding with multi-byte
characters.
2014-07-08 Mario Pulido <mario.pulido@artica.es>
* include/help/en/help_snmp_alert_field1.php,

View File

@ -582,7 +582,7 @@ function events_comment ($id_event, $comment = '', $action = 'Added comment', $m
$event_comments_array[] = $comment_for_json;
$event_comments = json_encode($event_comments_array);
$event_comments = io_json_mb_encode($event_comments_array);
// Update comment
$ret = db_process_sql_update($event_table, array('user_comment' => $event_comments), array('id_evento' => implode(',', $id_event)));

View File

@ -172,7 +172,7 @@ if (is_ajax ()) {
$return = array('fired' => 0);
}
echo json_encode($return);
echo io_json_mb_encode($return);
}
return;

View File

@ -52,7 +52,7 @@ if (is_ajax()) {
$event_filter['tag_with'] = base64_encode(io_safe_output($event_filter['tag_with']));
$event_filter['tag_without'] = base64_encode(io_safe_output($event_filter['tag_without']));
echo json_encode($event_filter);
echo io_json_mb_encode($event_filter);
}
// Saves an event filter
@ -69,8 +69,8 @@ if (is_ajax()) {
$values['event_view_hr'] = get_parameter('event_view_hr');
$values['id_user_ack'] = get_parameter('id_user_ack');
$values['group_rep'] = get_parameter('group_rep');
$values['tag_with'] = get_parameter('tag_with', json_encode(array()));
$values['tag_without'] = get_parameter('tag_without', json_encode(array()));
$values['tag_with'] = get_parameter('tag_with', io_json_mb_encode(array()));
$values['tag_without'] = get_parameter('tag_without', io_json_mb_encode(array()));
$values['filter_only_alert'] = get_parameter('filter_only_alert');
$values['id_group_filter'] = get_parameter('id_group_filter');
@ -97,8 +97,8 @@ if (is_ajax()) {
$values['event_view_hr'] = get_parameter('event_view_hr');
$values['id_user_ack'] = get_parameter('id_user_ack');
$values['group_rep'] = get_parameter('group_rep');
$values['tag_with'] = get_parameter('tag_with', json_encode(array()));
$values['tag_without'] = get_parameter('tag_without', json_encode(array()));
$values['tag_with'] = get_parameter('tag_with', io_json_mb_encode(array()));
$values['tag_without'] = get_parameter('tag_without', io_json_mb_encode(array()));
$values['filter_only_alert'] = get_parameter('filter_only_alert');
$values['id_group_filter'] = get_parameter('id_group_filter');
@ -116,7 +116,7 @@ if (is_ajax()) {
if ($get_event_filters) {
$event_filter = events_get_event_filter_select();
echo json_encode($event_filter);
echo io_json_mb_encode($event_filter);
}
return;