diff options
| author | jeff <jeff> | 2008-07-01 05:01:29 +0000 |
|---|---|---|
| committer | jeff <jeff> | 2008-07-01 05:01:29 +0000 |
| commit | 28927e3351ada7621808a8e4c95b4f5f8094dc34 (patch) | |
| tree | feb450f63ff8ffa7773334c2948d5e26cc6bb31f /httemplate/search/cust_pkg.cgi | |
| parent | 31e5d11ee35ec63c7bcbb30c38c2c4ce020b6e75 (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 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; }, |
