[tools] testbot/cgi: Tweak the CollectionBlock master columns iterations.
Francois Gouget
fgouget at codeweavers.com
Sun Jun 5 19:59:33 CDT 2022
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
testbot/lib/ObjectModel/CGI/CollectionBlock.pm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
index 336c7cd05..e8156a1bf 100644
--- a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
+++ b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
@@ -243,7 +243,7 @@ sub GetDetailsLink($$)
my ($MasterColNames, $MasterColValues) = $Row->{Item}->GetMasterCols();
if (defined $MasterColNames)
{
- foreach my $ColIndex (0 .. @$MasterColNames - 1)
+ foreach my $ColIndex (0..$#{$MasterColNames})
{
$Row->{DetailsLink} .= "&". $MasterColNames->[$ColIndex] ."=".
uri_escape($MasterColValues->[$ColIndex]);
@@ -385,7 +385,7 @@ sub GenerateFormStart($)
my ($MasterColNames, $MasterColValues) = $self->{Collection}->GetMasterCols();
if (defined($MasterColNames))
{
- foreach my $ColIndex (0..scalar @$MasterColNames - 1)
+ foreach my $ColIndex (0..$#{$MasterColNames})
{
print "<div><input type='hidden' name='", $MasterColNames->[$ColIndex],
"' value='", $self->escapeHTML($MasterColValues->[$ColIndex]),
@@ -684,7 +684,7 @@ sub OnAction($$)
my ($MasterColNames, $MasterColValues) = $self->{Collection}->GetMasterCols();
if (defined($MasterColNames))
{
- foreach my $ColIndex (0 .. @$MasterColNames - 1)
+ foreach my $ColIndex (0..$#{$MasterColNames})
{
$Target .= ($ColIndex == 0 ? "?" : "&") . $MasterColNames->[$ColIndex] .
"=" . uri_escape($MasterColValues->[$ColIndex]);
--
2.30.2
More information about the wine-devel
mailing list