Francois Gouget : testbot/cgi: Simplify the default CollectionBlock::GetAction() implementation.
Alexandre Julliard
julliard at winehq.org
Tue Mar 29 15:04:23 CDT 2022
Module: tools
Branch: master
Commit: 85620f146d44f1c8bb3e546b36d60408214bb8a0
URL: https://source.winehq.org/git/tools.git/?a=commit;h=85620f146d44f1c8bb3e546b36d60408214bb8a0
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Tue Mar 29 17:57:56 2022 +0200
testbot/cgi: Simplify the default CollectionBlock::GetAction() implementation.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 6f5c4d5..d0f44b9 100644
--- a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
+++ b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
@@ -649,13 +649,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
More information about the wine-cvs
mailing list