[tools] testbot/cgi: Simplify the default CollectionBlock::GetAction() implementation.
Francois Gouget
fgouget at codeweavers.com
Tue Mar 29 10:57:56 CDT 2022
Signed-off-by: Francois Gouget <fgouget at 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
More information about the wine-devel
mailing list