# # # # # get_basic_ids() # # # # # subroutine(get_basic_ids( node profile, string current_language), ( # Returns a node which contains all the basic IDs (or checksums) # which are required to check up to date state of cached objects. # This node is typically created upon the initial report request. # The generated ID's are then used throughout the report generation # process. debug_message("#### get_basic_ids() START \n"); delete_node("v.basic_ids"); string lang_stats_pathname = LOGANALYSISINFO_DIRECTORY . "language/" . current_language . "/lang_stats.cfg"; # 2009-03-17 - GMF - If the current_language doesn't exist, use preferences.miscellaneous.language # 2009-12-28 - KHP - Disabled due the way we get the current_language but this would also violate the caching parameters. If # the current_language as provided doesn't exist then the system should actually throw an error. # if (!file_exists(lang_stats_pathname)) then ( # debug_message("#### WARNING - reguar lang_stats_pathname does not exist! \n"); # lang_stats_pathname = LOGANALYSISINFO_DIRECTORY . "language" . internal.directory_divider . preferences.miscellaneous.language . internal.directory_divider . "lang_stats.cfg"; # ); debug_message("#### current_language: " . current_language . "\n"); debug_message("#### lang_stats_pathname: " . lang_stats_pathname . "\n"); # For the lang_stats_checksum we use the file modification_time and size and not the node as base because getting # the checksum from the node would be a too expensive operation. delete_node("v.lang_stats_file_info"); get_file_info(lang_stats_pathname, "v.lang_stats_file_info"); # debug_message("\n" . node_as_string("v.lang_stats_file_info") . "\n"); string lang_stats_checksum = current_language . @("v.lang_stats_file_info.modification_time") . @("v.lang_stats_file_info.size"); string graph_colors_checksum = md5_digest(node_as_string("graph_colors")); string log_fields_checksum = md5_digest(node_as_string(profile . ".log.fields")); string database_fields_checksum = md5_digest(node_as_string(profile . ".database.fields")); string report_fields_checksum = md5_digest(node_as_string(profile . ".statistics.report_fields")); string reports_menu_checksum = md5_digest(node_as_string(profile . ".statistics.reports_menu")); string extended_profile_dat_id = log_fields_checksum . database_fields_checksum . report_fields_checksum . graph_colors_checksum; # KHP 15/Jan/2010 - log.field_options is no longer available # extended_profile_dat_id .= @(profile . ".log.field_options.sessions_page_field"); extended_profile_dat_id = md5_digest(extended_profile_dat_id); "v.basic_ids.product_build_id" = @("version.log_analysis_info_version"); "v.basic_ids.lang_stats_checksum" = lang_stats_checksum; "v.basic_ids.graph_colors_checksum" = graph_colors_checksum; "v.basic_ids.log_fields_checksum" = log_fields_checksum; "v.basic_ids.database_fields_checksum" = database_fields_checksum; "v.basic_ids.report_fields_checksum" = report_fields_checksum; "v.basic_ids.reports_menu_checksum" = reports_menu_checksum; "v.basic_ids.extended_profile_dat_id" = extended_profile_dat_id; debug_message("\n" . node_as_string("v.basic_ids") . "\n"); # Return basic_ids node "v.basic_ids"; ));