Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Made Verinice reports include attached reports. #2360

Merged
merged 4 commits into from
Feb 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions src/manage_sql_report_formats.c
Original file line number Diff line number Diff line change
Expand Up @@ -3997,11 +3997,18 @@ apply_report_format (gchar *report_format_id,

rf_dependencies_string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit late but this could have an if (report_config) around it, because the report_config is optional. It would save the SQL query when the report_config is 0 (and maybe prevent some weird situations if someone somehow has a report_config with id 0).

= sql_string ("SELECT value"
" FROM report_format_params"
" WHERE report_format = %llu"
" AND type = %i",
report_format,
REPORT_FORMAT_PARAM_TYPE_REPORT_FORMAT_LIST);
" FROM report_config_params"
" WHERE report_config = %llu AND name = 'Attached report formats'",
report_config);

if (!rf_dependencies_string || !strcmp (rf_dependencies_string, ""))
rf_dependencies_string
= sql_string ("SELECT value"
" FROM report_format_params"
" WHERE report_format = %llu"
" AND type = %i",
report_format,
REPORT_FORMAT_PARAM_TYPE_REPORT_FORMAT_LIST);

if (rf_dependencies_string)
{
Expand Down
Loading