diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b3a16ccf11..77473a29cc 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2013-02-14 Miguel de Dios + + * godmode/agentes/module_manager_editor_common.php, + include/functions_profile.php, operation/events/events_list.php: + changed in jQuery the deprecated function evalJSON for parseJSON. + + Fixes: #3604536 + 2013-02-14 Miguel de Dios * godmode/massive/massive_operations.php, diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index 103fb7434c..68297300d8 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -446,7 +446,7 @@ $(document).ready (function () { $(this).attr('selected','selected'); }); }); - + $("#submit-crtbutton").click(function () { $('#id_tag_selected option').map(function(){ $(this).attr('selected','selected'); @@ -455,7 +455,7 @@ $(document).ready (function () { $("#id_module_type").change(function () { var type_selected = $(this).val(); - var type_names = jQuery.evalJSON(Base64.decode($('#hidden-type_names').val())); + var type_names = jQuery.parseJSON(Base64.decode($('#hidden-type_names').val())); var type_name_selected = type_names[type_selected]; diff --git a/pandora_console/include/functions_profile.php b/pandora_console/include/functions_profile.php index ebf6fc4880..a5768f190d 100644 --- a/pandora_console/include/functions_profile.php +++ b/pandora_console/include/functions_profile.php @@ -69,27 +69,28 @@ function profile_get_profiles ($filter = false) { */ function profile_create_user_profile ($id_user, $id_profile = 1, $id_group = 0, $assignUser = false, $tags = '') { global $config; - + if (empty ($id_profile) || $id_group < 0) return false; // Checks if the user exists $result_user = users_get_user_by_id($id_user); - if (!$result_user){ + if (!$result_user) { return false; - } - + } + if (isset ($config["id_user"])) { //Usually this is set unless we call it while logging in (user known by auth scheme but not by pandora) $assign = $config["id_user"]; - } else { + } + else { $assign = $id_user; } - + if ($assignUser !== false) $assign = $assignUser; - + $insert = array ( "id_usuario" => $id_user, "id_perfil" => $id_profile, @@ -97,7 +98,7 @@ function profile_create_user_profile ($id_user, $id_profile = 1, $id_group = 0, "tags" => $tags, "assigned_by" => $assign ); - + return db_process_sql_insert ("tusuario_perfil", $insert); } diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index 5643119847..6b6e506438 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -945,7 +945,7 @@ function reorder_tags_inputs() { tags_base64 = $("#hidden-tag_with").val(); - tags = jQuery.evalJSON(Base64.decode(tags_base64)); + tags = jQuery.parseJSON(Base64.decode(tags_base64)); jQuery.each(tags, function(key, element) { if ($("#select_with option[value='" + element + "']").length == 1) { text = $("#select_with option[value='" + element + "']").text(); @@ -977,7 +977,7 @@ function reorder_tags_inputs() { tags_base64 = $("#hidden-tag_without").val(); - tags = jQuery.evalJSON(Base64.decode(tags_base64)); + tags = jQuery.parseJSON(Base64.decode(tags_base64)); jQuery.each(tags, function(key, element) { if ($("#select_without option[value='" + element + "']").length == 1) { text = $("#select_without option[value='" + element + "']").text();