diff --git a/AUTHORS b/AUTHORS index 33d9edd65..7a7850b27 100644 --- a/AUTHORS +++ b/AUTHORS @@ -72,6 +72,7 @@ The following submitted code, packages or analysis, and deserve special thanks: Christoph Robbert Oleksii Tsai Louis-Claude Canon + Jörg Plate Thanks to the following, who submitted detailed bug reports and excellent suggestions: diff --git a/ChangeLog b/ChangeLog index 7d5cb5797..bf890a089 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ Features + Feature #516, which allows the duplication of completed tasks (thanks to Peter De Poorter, Ethan Schoonover). + + Applied patch for feature #1005, which prevents the update-holidays.pl script + from creating duplicate holidays (thanks to Jörg Plate). + Added the new 'indented' format for the 'project' attribute. + The 'projects' report now uses 'project.indented' format. + The 'summary' report now uses 'project.indented' format. diff --git a/scripts/add-ons/update-holidays.pl b/scripts/add-ons/update-holidays.pl index 6a0a2488d..d3c1e9005 100755 --- a/scripts/add-ons/update-holidays.pl +++ b/scripts/add-ons/update-holidays.pl @@ -161,6 +161,7 @@ exit (1) if !defined $data || $data eq ''; # Filter the holidays according to @regions. my $id = 1; my $content; +my %seen; for my $holiday (split /\n/ms, $data) { my $parsed = from_json ($holiday); @@ -172,6 +173,7 @@ for my $holiday (split /\n/ms, $data) (@regions > 0 && ($parsed->{'region'} eq '' || exists $region_hash{$parsed->{'region'}}))) { + next if $seen{ $parsed->{'description'} . ':' . $parsed->{'date'} }++; $content .= "holiday.${locale}${id}.name=" . $parsed->{'description'} . "\n" . "holiday.${locale}${id}.date=" . $parsed->{'date'} . "\n"; }