[freeside-commits] freeside/httemplate/view/cust_main/packages status.html, 1.2, 1.3

Ivan,,, ivan at wavetail.420.am
Thu Feb 19 18:41:09 PST 2009


Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages
In directory wavetail.420.am:/tmp/cvs-serv21659/httemplate/view/cust_main/packages

Modified Files:
	status.html 
Log Message:
disable display of auto-suspend dates unless enabled by config.  at least until it can be made more efficient.  this is slowing down customer view waaaaaaaaaay too much.  RT#4830

Index: status.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages/status.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- status.html	7 Feb 2009 08:23:10 -0000	1.2
+++ status.html	20 Feb 2009 02:41:06 -0000	1.3
@@ -121,8 +121,11 @@
 %       } 
 %
 %     } 
-%   my $autosuspend = pkg_autosuspend_time( $cust_pkg );
-%   $cust_pkg->set('autosuspend', $autosuspend) if $autosuspend;
+%
+%     if ( $conf->exists('cust_pkg-show_autosuspend') ) {
+%       my $autosuspend = pkg_autosuspend_time( $cust_pkg );
+%       $cust_pkg->set('autosuspend', $autosuspend) if $autosuspend;
+%     }
 
       <% pkg_status_row_changed( $cust_pkg, %opt ) %>
       <% pkg_status_row_if( $cust_pkg, $last_bill_or_renewed, 'last_bill', %opt, curuser=>$curuser ) %>
@@ -167,6 +170,8 @@
 
 my %opt = @_;
 
+my $conf = new FS::Conf;
+
 my $bgcolor  = $opt{'bgcolor'};
 my $cust_pkg = $opt{'cust_pkg'};
 my $part_pkg = $opt{'part_pkg'};
@@ -352,7 +357,8 @@
   my $days = 7;
   my $time = time;
   my $pending_suspend = 0;
-  #this seems to be extremely inefficient...
+  #this seems to be extremely inefficient...  and is slowing down all customer
+  #views
   while ( $days > 0 &&
           scalar(
             grep { $_->part_event->action eq 'suspend' }



More information about the freeside-commits mailing list