#!/usr/local/bin/perl # hide_form.cgi # Build up a list of modules that should be hidden due to their managed # servers not being installed require './acl-lib.pl'; &ReadParse(); if ($in{'user'}) { &can_edit_user($in{'user'}) || &error($text{'edit_euser'}); $what = $in{'user'}; @whos = &list_users(); } else { $access{'groups'} || &error($text{'gedit_ecannot'}); $what = $in{'group'}; @whos = &list_groups(); } ($who) = grep { $_->{'name'} eq $what } @whos; &ui_print_header(undef, $text{'hide_title'}, ""); # Find modules to hide which the user has and which theoretically support # this OS %got = map { $_, 1 } @{$who->{'modules'}}; foreach $m (sort { $a->{'desc'} cmp $b->{'desc'} } &get_all_module_infos()) { if (&check_os_support($m) && $got{$m->{'dir'}} && !&foreign_installed($m->{'dir'}, 0)) { push(@hide, $m); } } if (@hide) { print "
\n"; print "\n"; print "\n"; print &text('hide_desc', "$what"),"
\n"; print "

\n"; print "$text{'hide_desc2'}

\n"; print "

\n"; } else { print &text('hide_none', "$what"),"

\n"; } &ui_print_footer( $in{'user'} ? ( "edit_user.cgi?user=$who", $text{'edit_return'} ) : ( "edit_group.cgi?group=$who", $text{'edit_return2'} ), "", $text{'index_return'});