[freeside-commits] branch FREESIDE_3_BRANCH updated. f90f0685f9855a840c8e49c895dcce1ce0752ae0
Ivan
ivan at 420.am
Wed Mar 23 20:58:54 PDT 2016
The branch, FREESIDE_3_BRANCH has been updated
via f90f0685f9855a840c8e49c895dcce1ce0752ae0 (commit)
from 705f668e3409858d6c34500d4c18cbcdf7b2ebd7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f90f0685f9855a840c8e49c895dcce1ce0752ae0
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Mar 23 20:58:52 2016 -0700
optimize customer list, RT#20173
diff --git a/FS/FS/pkg_svc.pm b/FS/FS/pkg_svc.pm
index fa82ec0..666d76b 100644
--- a/FS/FS/pkg_svc.pm
+++ b/FS/FS/pkg_svc.pm
@@ -1,12 +1,19 @@
package FS::pkg_svc;
+use base qw(FS::Record);
use strict;
-use vars qw( @ISA );
use FS::Record qw( qsearchs );
use FS::part_pkg;
use FS::part_svc;
- at ISA = qw( FS::Record );
+our $cache_enabled = 0;
+
+sub _simplecache {
+ my( $self, $hashref ) = @_;
+ if ( $cache_enabled && $hashref->{'svc'} ) {
+ $self->{'_svcpart'} = FS::part_svc->new($hashref);
+ }
+}
=head1 NAME
@@ -148,6 +155,7 @@ Returns the FS::part_svc object (see L<FS::part_svc>).
sub part_svc {
my $self = shift;
+ return $self->{_svcpart} if $self->{_svcpart};
qsearchs( 'part_svc', { 'svcpart' => $self->svcpart } );
}
-----------------------------------------------------------------------
Summary of changes:
FS/FS/pkg_svc.pm | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
More information about the freeside-commits
mailing list