# # # # # get_html_rep_element_exists.cfv # # # subroutine(get_html_rep_element_exists( string profile_name, string html_report_element_id), ( debug_message("\n\n#### get_html_rep_element_exists START \n"); bool html_report_element_exists = false; string html_report_element_file_path = LOGANALYSISINFO_DIRECTORY . "profiles_cache/" . profile_name . "/html_report_elements/" . html_report_element_id . ".txt"; bool html_report_element_file_exists = file_exists(html_report_element_file_path); # Check if the object is in disk whitelist. # We don't check for whitelist in memory for html report elements, it shouldn't be necessary. bool html_report_element_exists_in_whitelist = (?("profiles_cache." . profile_name . ".whitelist.html_report_elements." . html_report_element_id)); if (html_report_element_file_exists and html_report_element_exists_in_whitelist) then ( html_report_element_exists = true; ) else if (html_report_element_file_exists and !html_report_element_exists_in_whitelist) then ( # The html report element file does not exist in whitelist, so there is most likely an invaliud html report # element in html_report_elements cache. We delete the file. delete_file(html_report_element_file_path); ); debug_message("#### html_report_element_file_exists: " . html_report_element_file_exists . "\n"); debug_message("#### html_report_element_exists_in_whitelist: " . html_report_element_exists_in_whitelist . "\n"); debug_message("#### html_report_element_exists: " . html_report_element_exists . "\n"); html_report_element_exists; debug_message("#### get_html_rep_element_exists END \n"); ));