Fix checkbox when search matches one user

This commit is contained in:
Jamie Cameron
2008-04-30 17:45:58 +00:00
parent 7394fc92ed
commit 877f226941

View File

@@ -1701,7 +1701,15 @@ while(@ginfo = &my_getgrent()) {
$gidgrp{$ginfo[2]} = $ginfo[0];
}
&my_endgrent();
local ($anyedit) = grep { !$_->{'noedit'} } @$users;
# Work out if any users can be edited
local $anyedit;
foreach my $u (@$users) {
if (!$u->{'noedit'}) {
$anyedit = 1;
last;
}
}
$anyedit = 0 if ($noboxes);
local $lshow = !$nolast && $config{'last_show'};
@@ -1772,7 +1780,14 @@ sub groups_table
{
local ($groups, $formno, $noboxes, $links) = @_;
local ($anyedit) = grep { !$_->{'noedit'} } @$groups;
# Work out if any groups can be edited
local $anyedit;
foreach my $g (@$groups) {
if (!$g->{'noedit'}) {
$anyedit = 1;
last;
}
}
$anyedit = 0 if ($noboxes);
local @linksrow;