diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-06-12 22:13:18 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-06-12 22:13:18 +0000 |
commit | 463effb8ed3df53bc545c48533daa270b2e81362 (patch) | |
tree | 2b873928d8aeeea43c969bf83ed1c36dd68c6d9b | |
parent | ba4d9333a761c4582a6dd347c35edfbe90688729 (diff) | |
download | mgaadvisories-463effb8ed3df53bc545c48533daa270b2e81362.tar mgaadvisories-463effb8ed3df53bc545c48533daa270b2e81362.tar.gz mgaadvisories-463effb8ed3df53bc545c48533daa270b2e81362.tar.bz2 mgaadvisories-463effb8ed3df53bc545c48533daa270b2e81362.tar.xz mgaadvisories-463effb8ed3df53bc545c48533daa270b2e81362.zip |
Add publish time in status
-rwxr-xr-x | mkadvisories | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mkadvisories b/mkadvisories index c3fdeec..5b5dbf8 100755 --- a/mkadvisories +++ b/mkadvisories @@ -63,6 +63,16 @@ sub get_advisories { return \%advisories; } +sub publish_advisories { + my ($advdb) = @_; + foreach my $adv (keys %{$advdb->{advisories}}) { + next if $advdb->{advisories}{$adv}{status}{published}; + $advdb->{advisories}{$adv}{status}{published} = + $advdb->{advisories}{$adv}{pubtime} || time(); + save_status($advdb, $adv); + } +} + sub sort_advisories { my ($advdb) = @_; foreach my $adv (keys $advdb->{advisories}) { @@ -200,6 +210,7 @@ sub dumpdb { my %advdb; $advdb{advisories} = get_advisories(); +publish_advisories(\%advdb); sort_advisories(\%advdb); output_pages(\%advdb); dumpdb(\%advdb); |