#!/usr/local/bin/perl
# reconfig.cgi
# Save apache configuration

require './apache-lib.pl';
$access{'global'}==1 || &error($text{'reconfig_ecannot'});
&ReadParse();

foreach $m (split(/\0/, $in{'mods'})) {
	push(@mods, "$m/$in{'ver'}");
	}
&lock_file("$module_config_directory/site");
&read_file("$module_config_directory/site", \%site);
$site{'size'} = $in{'size'};
$site{'modules'} = join(' ', @mods);
&write_file("$module_config_directory/site", \%site);
chmod(0644, "$module_config_directory/site");
&unlock_file("$module_config_directory/site");
&webmin_log("reconfig", undef, undef, \%in);
&redirect("");

