Change display of groups on manage friends screen

If 1 group, display it.  If more than 1, display all groups
but this one.
This commit is contained in:
Colin Kuskie 2009-04-10 10:04:43 -07:00
parent a2c736459e
commit 8f5e9aac1f
2 changed files with 8 additions and 4 deletions

View file

@ -293,7 +293,9 @@ sub www_getFriendsAsJson {
my @records = ();
my $groups = $session->setting->get('groupsToManageFriends');
my @groupIds = split "\n", $groups;
@groupIds = grep { $_ ne $groupId } @groupIds;
if (scalar @groupIds > 1) {
@groupIds = grep { $_ ne $groupId } @groupIds;
}
my $groupNames = join "\n",
map { $_->name }
map { WebGUI::Group->new($session, $_) }
@ -341,7 +343,7 @@ sub www_getFriendsAsJson {
=head2 www_view ( )
The main view page for editing the user's profile.
The main view page for editing the user's friends.
=cut