# HG changeset patch # User Dominic Cleal # Date 1232904787 0 # Node ID 789877ff0e1a4568ea72ed1c6d8f29dadc87ba9a # Parent be92d2f1ab3f4f1d65b0735855841e00c8a0025d Changing dbparams to contain all settings diff -r be92d2f1ab3f -r 789877ff0e1a reproctool.cgi --- a/reproctool.cgi Sun Jan 25 17:31:03 2009 +0000 +++ b/reproctool.cgi Sun Jan 25 17:33:07 2009 +0000 @@ -9,12 +9,18 @@ use LWP::UserAgent; use Storable qw/store_fd fd_retrieve/; -# Settings -my $img_http_path = '/itemimgs'; -my $eve_central_url = 'http://eve-central.com/api/evemon'; -my $marks_cache = 'minerals.cache'; -my $marks_cache_expiry = 4 * 60 * 60; # 4 hours +# Settings from params.cgi +our (@dbparams, $img_http_path, $eve_central_url, + $marks_cache, $marks_cache_expiry); +$img_http_path = '/itemimgs'; +$eve_central_url = 'http://eve-central.com/api/evemon'; +$marks_cache = 'minerals.cache'; +$marks_cache_expiry = 4 * 60 * 60; # 4 hours + +require './params.cgi'; + +# Begin script my $cgi = new CGI; print $cgi->header(-type => 'text/html', -pragma => 'no-cache', @@ -136,8 +142,6 @@ my $mega = $cgi->param('mega') || user_error('No megacyte price'); my $morp = $cgi->param('morp') || user_error('No morphite price'); -our @dbparams; -require './dbparams.cgi'; my $db = DBI->connect(@dbparams) or die("Database connection failure: $DBI::errstr");