diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-06-17 16:31:13 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-06-17 16:31:13 +0000 |
commit | 7c4c1d3a5c991114d9d951cb550756fa314689f5 (patch) | |
tree | 7b79ffa52383dfa188d840a0a4464d6460d0a7a0 | |
parent | dc7f301d1dcc35643484f2c88f6e41eed41b67d8 (diff) | |
download | mgaadvisories-7c4c1d3a5c991114d9d951cb550756fa314689f5.tar mgaadvisories-7c4c1d3a5c991114d9d951cb550756fa314689f5.tar.gz mgaadvisories-7c4c1d3a5c991114d9d951cb550756fa314689f5.tar.bz2 mgaadvisories-7c4c1d3a5c991114d9d951cb550756fa314689f5.tar.xz mgaadvisories-7c4c1d3a5c991114d9d951cb550756fa314689f5.zip |
Don't save status for unpublished advisories
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | lib/MGA/Advisories.pm | 3 |
2 files changed, 4 insertions, 0 deletions
@@ -1,3 +1,4 @@ +- don't save status for unpublished advisories - fix display of publication date Version 0.8 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 = { |