diff options
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; }, |