Signed-off-by: Francois Gouget fgouget@codeweavers.com --- 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 3621702a4..019bc6328 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); }