mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
Respect global notification address
This commit is contained in:
@@ -209,9 +209,16 @@ print &ui_table_row($text{'index_sched'},
|
||||
[ 'w', $text{'index_schedw'} ] ]));
|
||||
|
||||
# Send email to
|
||||
print &ui_table_row($text{'index_email'},
|
||||
&ui_textbox("email", $config{'sched_email'} ||
|
||||
$gconfig{'webmin_email_to'}, 40));
|
||||
if ($gconfig{'webmin_email_to'}) {
|
||||
$efield = &ui_opt_textbox("email",
|
||||
$config{'sched_email'} eq '*' ? undef : $config{'sched_email'},
|
||||
40, &text('index_email_def',
|
||||
"<tt>$gconfig{'webmin_email_to'}</tt>"));
|
||||
}
|
||||
else {
|
||||
$efield = &ui_textbox("email", $config{'sched_email'}, 40);
|
||||
}
|
||||
print &ui_table_row($text{'index_email'}, $efield);
|
||||
|
||||
# Install or just notify?
|
||||
print &ui_table_row($text{'index_action'},
|
||||
|
||||
@@ -18,6 +18,7 @@ index_schedh=hour
|
||||
index_schedd=day
|
||||
index_schedw=week
|
||||
index_email=Email updates report to
|
||||
index_email_def=Webmin default ($1)
|
||||
index_action=Action when update needed
|
||||
index_action-1=Just notify for security updates
|
||||
index_action0=Just notify for any updates
|
||||
|
||||
@@ -5,7 +5,7 @@ require './package-updates-lib.pl';
|
||||
&ReadParse();
|
||||
|
||||
&lock_file($module_config_file);
|
||||
$config{'sched_email'} = $in{'email'};
|
||||
$config{'sched_email'} = $in{'email_def'} ? '*' : $in{'email'};
|
||||
$config{'sched_action'} = $in{'action'};
|
||||
&save_module_config();
|
||||
&unlock_file($module_config_file);
|
||||
|
||||
@@ -56,7 +56,8 @@ if ($tellcount) {
|
||||
}
|
||||
|
||||
# Email the admin
|
||||
$emailto = $config{'sched_email'} || $gconfig{'webmin_email_to'};
|
||||
$emailto = $config{'sched_email'} eq '*' ? $gconfig{'webmin_email_to'}
|
||||
: $config{'sched_email'};
|
||||
if ($emailto && $body) {
|
||||
&foreign_require("mailboxes", "mailboxes-lib.pl");
|
||||
my $from = &mailboxes::get_from_address();
|
||||
|
||||
Reference in New Issue
Block a user