function tool_main_set_restart_sequence_user($AS_ShardRestart) { global $db; global $AS_Name, $AS_ShardName; global $nel_user; global $restart_notification_emails; $sequence_info = tool_main_get_restart_sequence_by_id($AS_ShardRestart); if ($sequence_info) { $sql = "UPDATE " . NELDB_RESTART_SEQUENCE_TABLE . " SET restart_sequence_user_name='" . $nel_user['user_name'] . "' WHERE restart_sequence_id=" . $AS_ShardRestart; $db->sql_query($sql); nt_log("Shard Restart (Domain: '" . $AS_Name . "' - Shard: '" . $AS_ShardName . "' - Sequence: '" . $AS_ShardRestart . "') owner set to '" . $nel_user['user_name'] . "'"); $email_subject = "[Shard Admin Tool] Restart Sequence Takeover (id: " . $sequence_info['restart_sequence_id'] . ", step: " . $sequence_info['restart_sequence_step'] . ") for shard " . $AS_Name . "/" . $AS_ShardName . " by " . $nel_user['user_name']; $email_message = $email_subject; nt_email($email_subject, $email_message, $restart_notification_emails); } }
if ($AS_ShardRestart > 0) { // define the shards language $tpl->assign('tool_shard_language', $AS_ShardLang); $tpl->assign('tool_language_list', $tool_language_list); $tool_restart_message_reboot_list = tool_admin_restart_messages_get_list_from_name('reboot'); $tpl->assign('tool_restart_message_reboot_list', $tool_restart_message_reboot_list); $tool_restart_stop_list = tool_admin_restarts_get_list('DESC'); $tool_restart_start_list = tool_admin_restarts_get_list('ASC'); // they are assigned at the end of the script //$tpl->assign('tool_restart_stop_actions', $tool_restart_stop_list); //$tpl->assign('tool_restart_start_actions', $tool_restart_start_list); //$tool_restart_message_ready_list = tool_admin_restart_messages_get_list_from_name('ready'); //$tpl->assign('tool_restart_message_ready_list', $tool_restart_message_ready_list); //$tool_restart_message_list = tool_admin_restart_messages_get_list_from_name('open'); // restart information $tool_restart_info = tool_main_get_restart_sequence_by_id($AS_ShardRestart); $tpl->assign('tool_restart_info', $tool_restart_info); } $tpl->assign('tool_has_lock', true); } else { $tpl->assign('tool_no_lock', true); $tpl->assign('tool_no_annotation', true); } } if (tool_admin_applications_check('tool_main_lock_shard')) { $tpl->assign('restriction_tool_main_lock_shard', true); } if (tool_admin_applications_check('tool_main_lock_domain')) { $tpl->assign('restriction_tool_main_lock_domain', true); } elseif (!tool_admin_applications_check('tool_main_lock_domain') && tool_admin_applications_check('tool_main_lock_shard') && tool_main_get_shard_as_id($view_shard_id) == "*") { // you have shard lock access