Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/web/JobDetails.pl | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl index 6d3f13cd04..3fbdb427e6 100644 --- a/testbot/web/JobDetails.pl +++ b/testbot/web/JobDetails.pl @@ -185,20 +185,10 @@ sub OnJobControl($$) { my ($self, $Action) = @_;
- my $ErrMessage = $self->CanDoJobControl($Action); - if (defined $ErrMessage) - { - $self->{EnclosingPage}->SetError(undef, $ErrMessage); - return !1; - } + return !1 if ($self->{EnclosingPage}->AddError($self->CanDoJobControl($Action)));
my $JobId = $self->{EnclosingPage}->GetJob()->Id; - $ErrMessage = JobControl($Action, $JobId); - if (defined $ErrMessage) - { - $self->{EnclosingPage}->SetError(undef, $ErrMessage); - return !1; - } + return !1 if ($self->{EnclosingPage}->AddError(JobControl($Action, $JobId)));
# Ideally this would use something like GetMoreInfoLink() to rebuild a Get # URL to preserve which logs and screenshots have been expanded. But if the