summaryrefslogtreecommitdiff
path: root/FS/FS/part_pkg.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2016-03-23 19:19:37 -0700
committerIvan Kohler <ivan@freeside.biz>2016-03-23 19:19:37 -0700
commit79019df554d5c447da8b1df135b34d66a0cb69c6 (patch)
treef872ca8a43a79158cb5e77c6a616b916390c8c25 /FS/FS/part_pkg.pm
parentd2d9921b2bd4228e78ce6c793d700c327d3c597c (diff)
optimize customer list (fix option caching in 3.x), RT#20173
Diffstat (limited to 'FS/FS/part_pkg.pm')
-rw-r--r--FS/FS/part_pkg.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm
index 45bdc62..8f00304 100644
--- a/FS/FS/part_pkg.pm
+++ b/FS/FS/part_pkg.pm
@@ -1416,9 +1416,8 @@ sub option {
my( $self, $opt, $ornull ) = @_;
#cache: was pulled up in the original part_pkg query
- if ( $opt =~ /^(setup|recur)_fee$/ && defined($self->hashref->{"_$opt"}) ) {
- return $self->hashref->{"_$opt"};
- }
+ return $self->hashref->{"_opt_$opt"}
+ if exists $self->hashref->{"_opt_$opt"};
cluck "$self -> option: searching for $opt" if $DEBUG;
my $part_pkg_option =