[tools] testbot/cgi: Simplify the default CollectionBlock::GetAction() implementation.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> --- testbot/lib/ObjectModel/CGI/CollectionBlock.pm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm index 58bf927ca..053b22545 100644 --- a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm +++ b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm @@ -654,13 +654,9 @@ sub GetActions($) { my ($self) = @_; - my @Actions; - if ($self->CallGetDetailsPage()) - { - $Actions[0] = "Add " . $self->{Collection}->GetItemName(); - } - - return \@Actions; + return $self->CallGetDetailsPage() ? + ["Add ". $self->{Collection}->GetItemName()] : + []; } =pod -- 2.30.2
participants (1)
-
Francois Gouget