diff options
author | jeff <jeff> | 2008-07-01 05:03:42 +0000 |
---|---|---|
committer | jeff <jeff> | 2008-07-01 05:03:42 +0000 |
commit | 7905f5dfd903529a6de89875e6fae74638a89aa3 (patch) | |
tree | c0b2127274371c3eb040dd0fc3d9e58e0fa11627 /httemplate/search/cust_pkg.cgi | |
parent | 3b268aa232236ad064c7b3f47a6a0a242e395bdf (diff) |
correct internal reason searching, prevent interleaved suspend/cancel/expire/adjourn, backporting and refactoring
Diffstat (limited to 'httemplate/search/cust_pkg.cgi')
-rwxr-xr-x | httemplate/search/cust_pkg.cgi | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi index 6c63ed412..bd4a9466f 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; }, |