aboutsummaryrefslogtreecommitdiffstats
path: root/english/template
diff options
context:
space:
mode:
authorThomas Lange <lange@debian.org>2024-01-11 14:47:20 +0100
committerThomas Lange <lange@debian.org>2024-01-11 14:47:20 +0100
commitce45aa1dfe87d3e81aa6d7f9f83e9a418deeb199 (patch)
tree215ce75efcf9a3342f1fed1b38d82ed5f40a0841 /english/template
parentf4686b259459292c62bf444fb198e5c53052464a (diff)
remove functions which were only used for security
Diffstat (limited to 'english/template')
-rw-r--r--english/template/debian/recent_list_common.wml9
-rw-r--r--english/template/debian/recent_list_security.wml95
2 files changed, 0 insertions, 104 deletions
diff --git a/english/template/debian/recent_list_common.wml b/english/template/debian/recent_list_common.wml
index c02982ddf3f..3280fa19778 100644
--- a/english/template/debian/recent_list_common.wml
+++ b/english/template/debian/recent_list_common.wml
@@ -18,15 +18,6 @@ sub get_recent_list {
return $str;
}
-sub get_directory_list {
- my ($rel_path, $eng_dir, $files_match, $data_callback, $format_list_callback, $format_item_callback) = @_;
-
- my $files = get_matching_filenames($rel_path, $eng_dir, qr/^d[ls]a-.+.wml$/);
- my $data = get_files_data($files, $eng_dir, \&get_dsa_data);
- my $str = $format_list_callback->($data, $format_item_callback);
-
- return $str;
-}
sub slurp_file_openrecode {
my ($file, $eng_dir) = @_;
diff --git a/english/template/debian/recent_list_security.wml b/english/template/debian/recent_list_security.wml
index 412043ce24e..23a1076b6bf 100644
--- a/english/template/debian/recent_list_security.wml
+++ b/english/template/debian/recent_list_security.wml
@@ -14,101 +14,6 @@
<perl>
-# get_recent_security_list( $time, $number, $security_rel_path, $english_dir )
-# get_recent_security_list_rdf( [rdf, rdf-long, rdfseq], $time, $number, $security_rel_path, $english_dir )
-# get_directory_security_list( $security_year_dir, $english_year_dir )
-#
-# get_recent_security_list grabs the date and title of the most recent security
-# advisories. The amount of advisories shown is controlled by parameters
-# $number and $time.
-#
-# The format of the time specification $time
-# is \d+(d|w|m|y) for \d+ days/weeks/months/years.
-# If $time is true, $number is only the minimum number of shown items.
-#
-# $security_rel_path is the relative path to security/, $english_dir is $(ENGLISHDIR)/security
-#
-# get_directory_security_list creates a list for a complete year of security
-# advisories. In this case you give the path to the year directory directly
-# instead of the path of the security top directory.
-#
-# example usage:
-# 1) /index.wml
-# get_recent_security_list( '2w', '10', 'security/', '$(ENGLISHDIR)/security' )
-# 2) security/index.wml
-# get_recent_security_list( '1m', '6', '.', '$(ENGLISHDIR)/security' )
-# 3) security/dsa.rdf.in
-# get_recent_security_list_rdf( 'rdf', '1m', '6', '.', '$(ENGLISHDIR)/security' );
-# 4) security/2015/index.wml
-# get_directory_security_list ('.', '$(ENGLISHDIR)/security/2015' )
-
-# get_recent_security_list( $time, $number, $security_rel_path, $english_dir )
-sub get_recent_security_list {
- return get_recent_list( @_, qr/^d[ls]a-.+.wml$/, \&get_dsa_data, \&format_security_items, \&format_security_item );
-}
-
-# get_recent_security_list_rdf( [rdf, rdf-long, rdfseq], $time, $number, $security_rel_path, $english_dir )
-sub get_recent_security_list_rdf {
- my ($format) = shift;
- #warn "get_recent_security_list_rdf( format = $format )";
- if( $format eq 'rdf' ){
- return get_recent_list( @_, qr/^d[ls]a-.+.wml$/, \&get_dsa_data, \&format_security_items, \&format_security_item_rdf );
- }elsif( $format eq 'rdf-long' ){
- return get_recent_list( @_, qr/^d[ls]a-.+.wml$/, \&get_dsa_data, \&format_security_items, \&format_security_item_rdf_long );
- }elsif( $format eq 'rdfseq' ){
- return get_recent_list( @_, qr/^d[ls]a-.+.wml$/, \&get_dsa_data, \&format_security_items, \&format_security_item_rdf_seq );
- }else{
- die "unknown format $format\n";
- }
-}
-
-# get_directory_security_list( $security_year_dir, $english_year_dir )
-sub get_directory_security_list {
- return get_directory_list( @_, qr/^d[ls]a-.+.wml$/, \&get_dsa_data, \&format_security_items, \&format_security_item );
-}
-
-
-
-sub get_dsa_data {
- my ($file, $eng_dir, $data) = @_;
-
- (my $basename = $file) =~ s/\.wml$//;
-
- #warn "get_dsa_data( $file, $eng_dir, $data )\n";
- my $content = slurp_file_openrecode($file, $eng_dir);
-
- my $title = match_tag($content, 'pagetitle');
- my $desc = match_tag($content, 'description');
- my $moreinfo = match_tag_first_p($content, 'moreinfo');
-
- # read in datafile
- my $data_content = slurp_file("$eng_dir/$basename.data");
- my $t = match_tag($data_content, 'pagetitle');
- $title = $t if $t;
- $rdate = match_tag($data_content, 'report_date');
-
- my @hdate = split ',', $rdate;
- my @isodate = map( sprintf("%04d-%02d-%02d", split '-', $_), @hdate );
-
- #warn "rdate=$rdate title=$title desc=$desc\n";
- my $revision = 1;
- foreach my $isodate (@isodate){
- my $timestamp = iso2stamp($isodate);
- #warn "$isodate ($timestamp) => $file\n";
- push @{$data->{$timestamp}}, {
- file => $file,
- basename => $basename,
- isodate => $isodate,
- date => newsdate($isodate),
- title => $title,
- revision => $revision++,
- description => $desc,
- moreinfo => $moreinfo,
- };
- }
-}
-
-
sub format_security_items {
my ($data, $format_item) = @_;

© 2014-2024 Faster IT GmbH | imprint | privacy policy