summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main
diff options
context:
space:
mode:
authorivan <ivan>2009-03-30 00:32:03 +0000
committerivan <ivan>2009-03-30 00:32:03 +0000
commit3b5ccffae54e59c012eb1ebb348207510ca1d5ce (patch)
tree751619418bed9ef4d4f6d241bdfc02164c3022bb /httemplate/view/cust_main
parent75989a32bd20f0ab3d38d2cd2c05795ea9b7590d (diff)
part_pkg caching should speedup display of lots of packages, RT#5083
Diffstat (limited to 'httemplate/view/cust_main')
-rwxr-xr-xhttemplate/view/cust_main/packages.html11
1 files changed, 10 insertions, 1 deletions
diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html
index 7643e3efd..9b1d5b317 100755
--- a/httemplate/view/cust_main/packages.html
+++ b/httemplate/view/cust_main/packages.html
@@ -76,6 +76,7 @@ Current packages
<TH CLASS="grid" BGCOLOR="#cccccc">Services</TH>
</TR>
+% my %part_pkg = ();
% foreach my $cust_pkg (@$packages) {
%
% if ( $bgcolor eq $bgcolor1 ) {
@@ -84,12 +85,18 @@ Current packages
% $bgcolor = $bgcolor1;
% }
%
+% $part_pkg{$cust_pkg->pkgpart} ||= $cust_pkg->part_pkg;
+% $cust_pkg->{'_pkgpart'} ||= $part_pkg{$cust_pkg->pkgpart}; #XXX cache kludge
+%
% my %iopt = (
% 'bgcolor' => $bgcolor,
% 'cust_pkg' => $cust_pkg,
-% 'part_pkg' => $cust_pkg->part_pkg,
+% 'part_pkg' => $part_pkg{$cust_pkg->pkgpart},
% %conf_opt,
% );
+%
+% my $oldDEBUG = $FS::cust_pkg::DEBUG;
+% $FS::cust_pkg::DEBUG = 2;
<!--pkgnum: <% $cust_pkg->pkgnum %>-->
<TR>
@@ -101,6 +108,8 @@ Current packages
<% include('packages/services.html', %iopt) %>
</TR>
+% $FS::cust_pkg::DEBUG = $oldDEBUG;
+
% }
</TABLE>