Don't flush if no change

This commit is contained in:
Jamie Cameron
2020-09-29 18:04:59 -07:00
parent 63e4afbce6
commit 78fb6c26b9
8 changed files with 8 additions and 8 deletions

View File

@ -89,7 +89,7 @@ else {
$in{"pgsql.max_links"});
}
&flush_file_lines_as_user($in{'file'});
&flush_file_lines_as_user($in{'file'}, undef, 1);
&unlock_file($in{'file'});
&graceful_apache_restart($in{'file'});
&webmin_log("db", undef, $in{'file'});

View File

@ -27,7 +27,7 @@ $in{'ext_def'} || $in{'ext'} =~ /\S/ || &error($text{'dirs_eext'});
$in{'utmp_def'} || -d $in{'utmp'} || &error($text{'dirs_eutmp'});
&save_directive($conf, "upload_tmp_dir", $in{'utmp_def'} ? undef : $in{'utmp'});
&flush_file_lines_as_user($in{'file'});
&flush_file_lines_as_user($in{'file'}, undef, 1);
&unlock_file($in{'file'});
&graceful_apache_restart($in{'file'});
&webmin_log("dirs", undef, $in{'file'});

View File

@ -51,7 +51,7 @@ elsif ($in{"error_log_def"} == 2) {
&save_directive($conf, "error_log", $in{"error_log"});
}
&flush_file_lines_as_user($in{'file'});
&flush_file_lines_as_user($in{'file'}, undef, 1);
&unlock_file($in{'file'});
&graceful_apache_restart($in{'file'});
&webmin_log("errors", undef, $in{'file'});

View File

@ -41,7 +41,7 @@ $in{"max_input_time_def"} || $in{"max_input_time"} =~ /^\-?\d+$/ ||
&save_directive($conf, "max_input_time",
$in{"max_input_time_def"} ? undef : $in{"max_input_time"});
&flush_file_lines_as_user($in{'file'});
&flush_file_lines_as_user($in{'file'}, undef, 1);
&unlock_file($in{'file'});
&graceful_apache_restart($in{'file'});
&webmin_log("limits", undef, $in{'file'});

View File

@ -61,7 +61,7 @@ else {
&save_directive($conf, "default_charset",
$in{'default_charset_def'} ? undef : $in{'default_charset'});
&flush_file_lines_as_user($in{'file'});
&flush_file_lines_as_user($in{'file'}, undef, 1);
&unlock_file($in{'file'});
&graceful_apache_restart($in{'file'});
&webmin_log("misc", undef, $in{'file'});

View File

@ -27,7 +27,7 @@ foreach $d ([ "safe_mode_include_dir", "safe_einclude" ],
}
}
&flush_file_lines_as_user($in{'file'});
&flush_file_lines_as_user($in{'file'}, undef, 1);
&unlock_file($in{'file'});
&graceful_apache_restart($in{'file'});
&webmin_log("safe", undef, $in{'file'});

View File

@ -54,7 +54,7 @@ else {
$in{"session.gc_maxlifetime"});
}
&flush_file_lines_as_user($in{'file'});
&flush_file_lines_as_user($in{'file'}, undef, 1);
&unlock_file($in{'file'});
&graceful_apache_restart($in{'file'});
&webmin_log("session", undef, $in{'file'});

View File

@ -14,7 +14,7 @@ foreach $v ("magic_quotes_gpc", "magic_quotes_runtime",
"register_argc_argv") {
&save_directive($conf, $v, $in{$v} || undef);
}
&flush_file_lines_as_user($in{'file'});
&flush_file_lines_as_user($in{'file'}, undef, 1);
&unlock_file($in{'file'});
&graceful_apache_restart($in{'file'});
&webmin_log("vars", undef, $in{'file'});