projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
optimize customer view: avoid looking up config values inside loops, RT#4728
[freeside.git]
/
httemplate
/
view
/
cust_main
/
packages
/
location.html
diff --git
a/httemplate/view/cust_main/packages/location.html
b/httemplate/view/cust_main/packages/location.html
index
b51616d
..
59efce1
100644
(file)
--- a/
httemplate/view/cust_main/packages/location.html
+++ b/
httemplate/view/cust_main/packages/location.html
@@
-33,14
+33,11
@@
my %opt = @_;
my %opt = @_;
-my $conf = new FS::Conf;
-
my $bgcolor = $opt{'bgcolor'};
my $cust_pkg = $opt{'cust_pkg'};
my $part_pkg = $opt{'part_pkg'};
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;
|| ($countrydefault eq 'US' ? 'CA' : '');
my $loc = $cust_pkg->cust_location_or_main;