mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Use standard functions
This commit is contained in:
@@ -1516,7 +1516,7 @@ sub before_save
|
||||
{
|
||||
if ($config{'check_config'} && !defined($save_file)) {
|
||||
$save_file = &transname();
|
||||
&execute_command("cp $config{'postfix_config_file'} $save_file");
|
||||
©_source_dest($config{'postfix_config_file'}, $save_file);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1525,11 +1525,12 @@ sub after_save
|
||||
if (defined($save_file)) {
|
||||
local $err = &check_postfix();
|
||||
if ($err) {
|
||||
&execute_command("mv $save_file $config{'postfix_config_file'}");
|
||||
©_source_dest($save_file, $config{'postfix_config_file'});
|
||||
&unlink_file($save_file);
|
||||
&error(&text('after_err', "<pre>$err</pre>"));
|
||||
}
|
||||
else {
|
||||
unlink($save_file);
|
||||
&unlink_file($save_file);
|
||||
$save_file = undef;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user