add tests to deleting groups and try to create a loop

This commit is contained in:
Colin Kuskie 2006-03-17 06:08:25 +00:00
parent df0d073120
commit b0e0cec9aa
2 changed files with 42 additions and 4 deletions

View file

@ -256,8 +256,9 @@ sub deleteGroups {
my $groups = shift;
$self->session->stow->delete("isInGroup");
foreach my $gid (@{$groups}) {
$self->session->db->write("delete from groupGroupings where groupId=".$self->session->db->quote($gid)." and inGroup=".$self->session->db->quote($self->getId));
$self->session->db->write("delete from groupGroupings where groupId=? and inGroup=?",[$gid, $self->getId]);
}
$self->session->stow->delete("gotGroupsInGroup");
}