mirror of
https://github.com/webmin/webmin.git
synced 2026-06-01 02:30:26 +01:00
Merge branch 'master' of github.com:webmin/webmin
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -299,7 +299,8 @@ if ($mode == 0) {
|
||||
$file = &date_subs($path);
|
||||
}
|
||||
else {
|
||||
$file = &transname();
|
||||
my $ext = &has_command("gzip") ? '.tar.gz' : '.tar';
|
||||
$file = &transname_timestamped("backup", $ext);
|
||||
}
|
||||
|
||||
# Get module descriptions
|
||||
|
||||
@@ -101,7 +101,7 @@ else {
|
||||
|
||||
# Key algorithm
|
||||
print &ui_table_row($text{'zonekey_alg'},
|
||||
&ui_select("alg", "RSASHA1",
|
||||
&ui_select("alg", "RSASHA256",
|
||||
[ &list_dnssec_algorithms() ]));
|
||||
|
||||
# Key size
|
||||
|
||||
@@ -343,6 +343,23 @@ push(@main::temporary_files, $rv);
|
||||
return $rv;
|
||||
}
|
||||
|
||||
=head2 transname_timestamped([filename], [extension])
|
||||
|
||||
Behaves exactly like transname, but returns a filename with current timestamp
|
||||
|
||||
=item filename - Optional filename prefix to preppend
|
||||
|
||||
=item extension - Optional extension for a filename to append
|
||||
|
||||
=cut
|
||||
sub transname_timestamped
|
||||
{
|
||||
my ($fname, $fextension) = @_;
|
||||
my $fdate = strftime('%Y%m%d_%H%M%S', localtime());
|
||||
$fname = "${fname}-" if ($fname);
|
||||
return &transname("$fname$fdate$fextension");
|
||||
}
|
||||
|
||||
=head2 trunc(string, maxlen)
|
||||
|
||||
Truncates a string to the shortest whole word less than or equal to the
|
||||
|
||||
Reference in New Issue
Block a user