Francois Gouget : testbot/web: The UsersList page deals with users so rename the $Item parameter.
Module: tools Branch: master Commit: 1976e3811184c2d17a80d8bbfc36fb3a63cadb10 URL: https://source.winehq.org/git/tools.git/?a=commit;h=1976e3811184c2d17a80d8bb... Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Mar 30 19:04:18 2022 +0200 testbot/web: The UsersList page deals with users so rename the $Item parameter. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/web/admin/UsersList.pl | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/testbot/web/admin/UsersList.pl b/testbot/web/admin/UsersList.pl index 3621702..019bc63 100644 --- a/testbot/web/admin/UsersList.pl +++ b/testbot/web/admin/UsersList.pl @@ -58,12 +58,12 @@ sub DisplayProperty($$$) sub GenerateDataCell($$$$$) { - my ($self, $CollectionBlock, $Item, $PropertyDescriptor, $DetailsPage) = @_; + my ($self, $CollectionBlock, $User, $PropertyDescriptor, $DetailsPage) = @_; my $PropertyName = $PropertyDescriptor->GetName(); if ($PropertyName eq "Status") { - my $Status = $Item->Status; + my $Status = $User->Status; my ($Class, $Label); if ($Status eq "disabled") { @@ -73,19 +73,19 @@ sub GenerateDataCell($$$$$) { ($Class, $Label) = ('userdeleted', 'deleted'); } - elsif ($Item->WaitingForApproval()) + elsif ($User->WaitingForApproval()) { ($Class, $Label) = ('userrequest', 'request'); } - elsif (!$Item->Activated()) + elsif (!$User->Activated()) { ($Class, $Label) = ('userapproved', 'approved'); } - elsif ($Item->HasRole("admin")) + elsif ($User->HasRole("admin")) { ($Class, $Label) = ('useradmin', 'admin'); } - elsif ($Item->HasRole("wine-devel")) + elsif ($User->HasRole("wine-devel")) { ($Class, $Label) = ('userdevel', 'wine-devel'); } @@ -93,12 +93,12 @@ sub GenerateDataCell($$$$$) { ($Class, $Label) = ('usernone', 'none'); } - print "<td><a href='/admin/UserDetails.pl?Key=", uri_escape($Item->GetKey()), + print "<td><a href='/admin/UserDetails.pl?Key=", uri_escape($User->GetKey()), "'><span class='$Class'>$Label</span></a></td>"; } else { - $self->SUPER::GenerateDataCell($CollectionBlock, $Item, $PropertyDescriptor, $DetailsPage); + $self->SUPER::GenerateDataCell($CollectionBlock, $User, $PropertyDescriptor, $DetailsPage); } } @@ -112,20 +112,20 @@ sub GetItemActions($$) sub OnItemAction($$$$) { - my ($self, $CollectionBlock, $Item, $Action) = @_; + my ($self, $CollectionBlock, $User, $Action) = @_; if ($Action eq "Delete") { - $Item->Status('deleted'); - (my $ErrProperty, $self->{ErrMessage}) = $Item->Save(); + $User->Status('deleted'); + (my $ErrProperty, $self->{ErrMessage}) = $User->Save(); return 0 if (defined $self->{ErrMessage}); # Forcefully log out that user by deleting the web sessions - DeleteSessions($Item); + DeleteSessions($User); return 1; } - return $self->SUPER::OnItemAction($CollectionBlock, $Item, $Action); + return $self->SUPER::OnItemAction($CollectionBlock, $User, $Action); }
participants (1)
-
Alexandre Julliard