From ba1f29944097164c7ffe5c11a42bad8139f7de5c Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 10 Apr 2023 10:35:47 +0200 Subject: [PATCH] fixed add commet event --- .../include/javascript/pandora_events.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index 2f657779a6..4e3581f2fb 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -465,22 +465,19 @@ function event_comment(current_event) { return false; } - var params = []; - params.push("page=include/ajax/events"); - params.push("add_comment=1"); - if (event.event_rep > 0) { - params.push("event_id=" + event.max_id_evento); - } else { - params.push("event_id=" + event.id_evento); - } - params.push("comment=" + comment); - params.push("server_id=" + event.server_id); + var params = { + page: "include/ajax/events", + add_comment: 1, + event_id: event.event_rep > 0 ? event.max_id_evento : event.id_evento, + comment: comment, + server_id: event.server_id + }; $("#button-comment_button").attr("disabled", "disabled"); $("#response_loading").show(); jQuery.ajax({ - data: params.join("&"), + data: params, type: "POST", url: getUrlAjax(), dataType: "html",