\n"; &ui_print_footer("", $text{'index_return'}); exit; } if ($in{'confirmed'}) { # Check for repeat click if ($group->{'group'} ne $in{'group'} || $in{'group'} eq '') { print "$text{'gdel_ealready'}
\n"; &ui_print_footer("", $text{'index_return'}); exit; } # Delete from other modules if ($in{'others'}) { print "$text{'gdel_other'}\n"; local $error_must_die = 1; eval { &other_modules("useradmin_delete_group", $group); }; if ($@) { print &text('udel_failed', $@),"
\n"; } else { print "$text{'gdel_done'}
\n"; } } # Delete from group file &lock_user_files(); print "$text{'gdel_group'}\n"; &set_group_envs($group, 'DELETE_GROUP'); $merr = &making_changes(); &error(&text('usave_emaking', "$merr")) if (defined($merr)); &delete_group($group); &unlock_user_files(); &made_changes(); &webmin_log("delete", "group", $group->{'group'}, $group); print "$text{'gdel_done'}
\n"; done: &ui_print_footer("index.cgi?mode=groups", $text{'index_return'}); } else { # check if this is anyone's primary group foreach $u (&list_users()) { if ($u->{'gid'} == $group->{'gid'}) { print "",&text('gdel_eprimary', $u->{'user'}), "
\n"; &ui_print_footer("", $text{'index_return'}); exit; } } # Ask if the user is sure print &ui_confirmation_form("delete_group.cgi", &text('gdel_sure', $group->{'group'}), [ [ "group", $group->{'group'} ] ], [ [ "confirmed", $text{'gdel_del'} ] ], ui_checkbox("others", 1, $text{'gdel_dothers'}, $config{'default_other'}), ); &ui_print_footer("index.cgi?mode=groups", $text{'index_return'}); }