summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main/packages/location.html
diff options
context:
space:
mode:
authorivan <ivan>2009-02-07 08:23:10 +0000
committerivan <ivan>2009-02-07 08:23:10 +0000
commit7d751137371d5e6e263265e7aa37433ad7f871c3 (patch)
tree1f7d0586cb3afe82bc535d61f364449d348c550b /httemplate/view/cust_main/packages/location.html
parente7ab6cb3a3e2b1cb9a33fa162356b428f02bae2d (diff)
optimize customer view: avoid looking up config values inside loops, RT#4728
Diffstat (limited to 'httemplate/view/cust_main/packages/location.html')
-rw-r--r--httemplate/view/cust_main/packages/location.html7
1 files changed, 2 insertions, 5 deletions
diff --git a/httemplate/view/cust_main/packages/location.html b/httemplate/view/cust_main/packages/location.html
index b51616d0c..59efce14a 100644
--- a/httemplate/view/cust_main/packages/location.html
+++ b/httemplate/view/cust_main/packages/location.html
@@ -33,14 +33,11 @@
my %opt = @_;
-my $conf = new FS::Conf;
-
my $bgcolor = $opt{'bgcolor'};
my $cust_pkg = $opt{'cust_pkg'};
my $part_pkg = $opt{'part_pkg'};
-my $conf = new FS::Conf;
-my $countrydefault = $conf->config('countrydefault') || 'US';
-my $statedefault = $conf->config('statedefault')
+my $countrydefault = $opt{'countrydefault'} || 'US';
+my $statedefault = $opt{'statedefault'}
|| ($countrydefault eq 'US' ? 'CA' : '');
my $loc = $cust_pkg->cust_location_or_main;