summaryrefslogtreecommitdiff
path: root/httemplate/search/cust_pkg.cgi
diff options
context:
space:
mode:
authorjeff <jeff>2008-07-01 05:01:29 +0000
committerjeff <jeff>2008-07-01 05:01:29 +0000
commit28927e3351ada7621808a8e4c95b4f5f8094dc34 (patch)
treefeb450f63ff8ffa7773334c2948d5e26cc6bb31f /httemplate/search/cust_pkg.cgi
parent31e5d11ee35ec63c7bcbb30c38c2c4ce020b6e75 (diff)
correct internal reason searching, prevent interleaved suspend/cancel/expire/adjourn, backporting and refactoring
Diffstat (limited to 'httemplate/search/cust_pkg.cgi')
-rwxr-xr-xhttemplate/search/cust_pkg.cgi9
1 files changed, 4 insertions, 5 deletions
diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi
index d9ed39116..8ad3dc5e1 100755
--- a/httemplate/search/cust_pkg.cgi
+++ b/httemplate/search/cust_pkg.cgi
@@ -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;
},