From 7c4c1d3a5c991114d9d951cb550756fa314689f5 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Mon, 17 Jun 2013 16:31:13 +0000 Subject: Don't save status for unpublished advisories --- lib/MGA/Advisories.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/MGA') diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm index a5071e4..0115438 100644 --- a/lib/MGA/Advisories.pm +++ b/lib/MGA/Advisories.pm @@ -50,6 +50,7 @@ sub status_file { sub save_status { my ($advdb, $adv) = @_; + return if $advdb->{advisories}{$adv}{no_save_status}; my $statusfile = status_file($adv); DumpFile($statusfile, $advdb->{advisories}{$adv}{status}); } @@ -61,6 +62,7 @@ sub get_advisories_from_dir { if (!$adv->{ID}) { next unless $config->{mode} eq 'qa'; $adv->{ID} = next_id('TODO', keys %advisories); + $adv->{no_save_status} = 1; } report_exit("Duplicate advisory $adv->{ID}") if $advisories{$adv->{ID}}; report_exit("Unknown type $adv->{type}") unless @@ -244,6 +246,7 @@ sub send_adv_mail { ); foreach my $adv (keys %{$advdb->{advisories}}) { next if $advdb->{advisories}{$adv}{no_mail}; + next if $advdb->{advisories}{$adv}{no_save_status}; next if $advdb->{advisories}{$adv}{status}{mail_sent}; my $mailcontent; my $vars = { -- cgit v1.2.1