# HG changeset patch # User Dominic Cleal # Date 1232906903 0 # Node ID 7d9abc345081c04561730a91803ff95c7450d7ba # Parent a4197a854e79107349b81db64813ec7e2c6650db Handling mineral defaults correctly diff -r a4197a854e79 -r 7d9abc345081 reproctool.cgi --- a/reproctool.cgi Sun Jan 25 18:02:01 2009 +0000 +++ b/reproctool.cgi Sun Jan 25 18:08:23 2009 +0000 @@ -67,6 +67,11 @@ unless ($marks) { + # User can enter their own numbers if eve-central was down + $marks->{$_} = 1 foreach ('Tritanium', 'Pyerite', 'Mexallon', + 'Isogen', 'Nocxium', 'Zydrine', + 'Megacyte', 'Morphite'); + # If cache was unavailable or had expired, pull again from eve-central my $ua = LWP::UserAgent->new; $ua->agent('reproctool'); @@ -94,13 +99,6 @@ store_fd($marks, *CACHE) || die("Can't write to cache: $!"); close CACHE; } - else - { - # User can enter their own numbers if eve-central was down - $marks->{$_} = 1 foreach ('Tritanium', 'Pyerite', 'Mexallon', - 'Isogen', 'Nocxium', 'Zydrine', - 'Megacyte', 'Morphite'); - } } delete $marks->{timestamp} if exists $marks->{timestamp};