Allow use of webmin variables in backup dests

This commit is contained in:
Jamie Cameron
2012-01-06 14:33:27 -08:00
parent e82828b105
commit 5fd32f9c11
66 changed files with 95 additions and 12 deletions

View File

@ -20,3 +20,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -18,3 +18,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/mysql/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/mysql/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -18,3 +18,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -16,3 +16,4 @@ max_dbs=50
my_cnf=/etc/mysql/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -23,3 +23,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -20,3 +20,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -20,3 +20,4 @@ max_dbs=50
my_cnf=/etc/mysql/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -20,3 +20,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -19,3 +19,4 @@ max_dbs=50
my_cnf=/etc/my.cnf
max_text=1000
nopwd=0
webmin_subs=0

View File

@ -8,6 +8,7 @@ blob_mode=Show blob and text fields as,1,0-Data in table,1-Links to download
nodbi=Use DBI to connect if available?,1,0-Yes,1-No
nopwd=Use MYSQL_PWD variable to pass password?,1,0-Yes,1-No
date_subs=Do <tt>strftime</tt> substitution of backup destinations?,1,1-Yes,0-No
webmin_subs=Do Webmin variable substitution on backup destinations?,1,1-Yes,0-No
passwd_mode=Password hashing mode,1,1-Old,0-Default
encoding=Encoding for database content,3,Default (from current language)
max_dbs=Maximum number of databases and tables to display,0,5

View File

@ -783,18 +783,23 @@ else {
# Does strftime-style date substitutions on a filename, if enabled
sub date_subs
{
local ($path) = @_;
local $rv;
if ($config{'date_subs'}) {
eval "use POSIX";
eval "use posix" if ($@);
local @tm = localtime(time());
&clear_time_locale();
local $rv = strftime($_[0], @tm);
$rv = strftime($path, @tm);
&reset_time_locale();
return $rv;
}
else {
return $_[0];
$path = $rv;
}
if ($config{'webmin_subs'}) {
$rv = &substitute_template($rv, { });
}
return $rv;
}
# execute_before(db, handle, escape, path, db-for-config)