chiark / gitweb /
Add commodclasses even for un-ordval'd commods
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 2 Nov 2009 15:56:31 +0000 (15:56 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 2 Nov 2009 15:56:31 +0000 (15:56 +0000)
yarrg/Commods.pm
yarrg/db-idempotent-populate

index 5161af2..c6ed253 100644 (file)
@@ -37,7 +37,7 @@ BEGIN {
     @ISA         = qw(Exporter);
     @EXPORT      = qw(&parse_info_clientside &fetch_with_rsync
                      &parse_info_serverside &parse_info_serverside_ocean
-                     %oceans %commods %clients
+                     %oceans %commods %clients %commodclasses
                      %vessels %shotname2damage
                      &parse_pctb_commodmap %pctb_commodmap @pctb_commodmap
                      &get_our_version &check_tsv_line
index 2e0b0ae..5e0a8d5 100755 (executable)
@@ -238,6 +238,8 @@ END
        if (defined $c->{Ordval} and defined $cl) {
            $incl{$cl}++;
            $setinclass->execute($incl{$cl}, $commod);
+       } elsif (defined $cl) {
+           $incl{$cl} += 0;
        }
     }
     db_doall(<<END);