[freeside-commits] freeside/httemplate/search cust_pkg.cgi, 1.42.2.8, 1.42.2.9

Jeff Finucane,420,, jeff at wavetail.420.am
Mon Jun 30 22:01:31 PDT 2008


Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv21844/httemplate/search

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	cust_pkg.cgi 
Log Message:
correct internal reason searching, prevent interleaved suspend/cancel/expire/adjourn, backporting and refactoring

Index: cust_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_pkg.cgi,v
retrieving revision 1.42.2.8
retrieving revision 1.42.2.9
diff -u -d -r1.42.2.8 -r1.42.2.9
--- cust_pkg.cgi	3 Jun 2008 21:06:39 -0000	1.42.2.8
+++ cust_pkg.cgi	1 Jul 2008 05:01:29 -0000	1.42.2.9
@@ -52,11 +52,10 @@
 
                     sub { my $self = shift;
                           my $return = '';
-                          if ($self->getfield('cancel') ||
-                            $self->getfield('suspend')) {
-                              my $reason = $self->last_reason;# too inefficient?
-                              $return = $reason->reason if $reason;
-
+                          foreach my $action ( qw ( cancel susp ) ) {
+                            my $reason = $self->last_reason($action);
+                            $return = $reason->reason if $reason;
+                            last if $return;
                           }
                           $return;
                         },



More information about the freeside-commits mailing list