Francois Gouget : testbot/cgi: Tweak the CollectionBlock master columns iterations.
Alexandre Julliard
julliard at winehq.org
Mon Jun 6 15:05:09 CDT 2022
Module: tools
Branch: master
Commit: 729f60d174304629b3f848c7f597044ec4a870f4
URL: https://source.winehq.org/git/tools.git/?a=commit;h=729f60d174304629b3f848c7f597044ec4a870f4
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Jun 6 02:59:33 2022 +0200
testbot/cgi: Tweak the CollectionBlock master columns iterations.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 336c7cd..e8156a1 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]);
More information about the wine-cvs
mailing list