#
#
# compose_bug_report_text()
#
#
# Output is a bug report text which is used in the bug report form and when sending email.
#KHP 11/Feb/2011 - compose_bug_report_text is no longer in use since we POST
#the bug report via HTTP.
#
#include "templates.util.alert.convert_node_to_alert_html";
#
#subroutine(compose_bug_report_text(
# string error_id,
# bool is_bug_report_in_email), (
#
# string message_file = LOGANALYSISINFO_DIRECTORY . "TemporaryFiles/" . error_id . "_error_message.txt";
# string traceback_file = LOGANALYSISINFO_DIRECTORY . "TemporaryFiles/" . error_id . "_error_traceback.txt";
# string info_file = LOGANALYSISINFO_DIRECTORY . "TemporaryFiles/" . error_id . "_error_info.txt";
#
# string error_message = string_to_html(read_file(message_file));
# string error_traceback = string_to_html(read_file(traceback_file));
#
# # 2008-09-29 - GMF - Read error_info file from disk
# string error_info_text = read_file(info_file);
#
#
#
# string licensing_tier_text = convert_node_to_alert_html("volatile.licensing.features");
#
# # debug_message("\n\n" . node_as_string("volatile.licensing.features") . "\n\n");
#
# bool is_webserver_mode = !CGI_MODE;
# string operation_mode;
#
# if (is_webserver_mode) then (
#
# operation_mode = "Webserver Mode";
# )
# else (
#
# operation_mode = "CGI Mode";
# );
#
# string bug_report = "MESSAGE
" . error_message . "
";
# bug_report .= "TRACEBACK
" . error_traceback . "
";
#
# # 2008-12-28 - GMF - Added expand(); otherwise we get Salang code in the emails we receive (because PRODUCT_NAME has embedded Salang).
# bug_report .= expand("SYSTEM
" . PRODUCT_NAME . " " . VERSION . " (" . ARCH . ", " . operation_mode . ")
");
# bug_report .= "LICENSING
" . licensing_tier_text . "
";
# bug_report .= "INFO
" . error_info_text . "
", ""); # bug_report = replace_all(bug_report, "", ""); # bug_report = replace_all(bug_report, "<", "<"); # bug_report = replace_all(bug_report, ">", ">"); # bug_report = replace_all(bug_report, '"', """); # ); # # bug_report; #));