2007-04-12 20:24:50 +00:00
|
|
|
#!/usr/local/bin/perl
|
|
|
|
# Update options related to PHP directories
|
|
|
|
|
|
|
|
require './phpini-lib.pl';
|
|
|
|
&error_setup($text{'dirs_err'});
|
|
|
|
&ReadParse();
|
|
|
|
&can_php_config($in{'file'}) || &error($text{'list_ecannot'});
|
|
|
|
|
|
|
|
&lock_file($in{'file'});
|
|
|
|
$conf = &get_config($in{'file'});
|
|
|
|
|
|
|
|
# Validate and save inputs
|
|
|
|
if ($in{'include_def'}) {
|
|
|
|
&save_directive($conf, "include_path", undef);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
@incs = split(/\r?\n/, $in{'include'});
|
|
|
|
@incs || &error($text{'dirs_eincs'});
|
|
|
|
&save_directive($conf, "include_path", join(":", @incs));
|
|
|
|
}
|
|
|
|
|
|
|
|
&save_directive($conf, "file_uploads", $in{'file_uploads'} || undef);
|
|
|
|
|
|
|
|
$in{'utmp_def'} || -d $in{'utmp'} || &error($text{'dirs_eutmp'});
|
|
|
|
&save_directive($conf, "upload_tmp_dir", $in{'utmp_def'} ? undef : $in{'utmp'});
|
|
|
|
|
2020-09-29 18:04:59 -07:00
|
|
|
&flush_file_lines_as_user($in{'file'}, undef, 1);
|
2007-04-12 20:24:50 +00:00
|
|
|
&unlock_file($in{'file'});
|
2017-06-01 12:45:41 -07:00
|
|
|
&graceful_apache_restart($in{'file'});
|
2007-04-12 20:24:50 +00:00
|
|
|
&webmin_log("dirs", undef, $in{'file'});
|
|
|
|
|
|
|
|
&redirect("list_ini.cgi?file=".&urlize($in{'file'}));
|
|
|
|
|