changeset 35:7d9abc345081

Handling mineral defaults correctly
author Dominic Cleal <dominic@computerkb.co.uk>
date Sun, 25 Jan 2009 18:08:23 +0000
parents a4197a854e79
children e8772d1bd517
files reproctool.cgi
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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};