mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Allow indent to be specified
This commit is contained in:
@@ -183,7 +183,7 @@ foreach $p ("daily", "weekly", "monthly") {
|
||||
return undef;
|
||||
}
|
||||
|
||||
# save_directive(&parent, &old|name, &new)
|
||||
# save_directive(&parent, &old|name, &new, [indent])
|
||||
sub save_directive
|
||||
{
|
||||
local $conf = $_[0]->{'members'};
|
||||
@@ -192,7 +192,7 @@ local $lref = &read_file_lines($old ? $old->{'file'} : $_[0]->{'file'});
|
||||
local $new = !defined($_[2]) ? undef : ref($_[2]) ? $_[2] :
|
||||
{ 'name' => $old ? $old->{'name'} : $_[1],
|
||||
'value' => $_[2] };
|
||||
local @lines = &directive_lines($new) if ($new);
|
||||
local @lines = &directive_lines($new, $_[3]) if ($new);
|
||||
local $gparent = &get_config_parent();
|
||||
if ($old && $new) {
|
||||
# Update
|
||||
|
||||
Reference in New Issue
Block a user