mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Added new setup menu to mail
This commit is contained in:
parent
df80304a80
commit
a1f23af142
@ -249,6 +249,7 @@ if (check_acl ($config['id_user'], 0, "PM")) {
|
|||||||
enterprise_hook ('enterprise_submenu');
|
enterprise_hook ('enterprise_submenu');
|
||||||
enterprise_hook ('historydb_submenu');
|
enterprise_hook ('historydb_submenu');
|
||||||
enterprise_hook ('log_collector_submenu');
|
enterprise_hook ('log_collector_submenu');
|
||||||
|
enterprise_hook ('mail_submenu');
|
||||||
|
|
||||||
$sub2["godmode/setup/setup&section=auth"]["text"] = __('Authentication');
|
$sub2["godmode/setup/setup&section=auth"]["text"] = __('Authentication');
|
||||||
$sub2["godmode/setup/setup&section=auth"]["refr"] = 0;
|
$sub2["godmode/setup/setup&section=auth"]["refr"] = 0;
|
||||||
|
@ -708,6 +708,20 @@ function config_update_config () {
|
|||||||
if (!config_update_value ('history_db_delay', get_parameter ('history_db_delay')))
|
if (!config_update_value ('history_db_delay', get_parameter ('history_db_delay')))
|
||||||
$error_update[] = __('Delay');
|
$error_update[] = __('Delay');
|
||||||
break;
|
break;
|
||||||
|
case 'mail':
|
||||||
|
if (!config_update_value ('email_from_dir', get_parameter('email_from_dir')))
|
||||||
|
$error_update[] = __('From dir');
|
||||||
|
if (!config_update_value ('email_from_name', get_parameter('email_from_name')))
|
||||||
|
$error_update[] = __('From name');
|
||||||
|
if (!config_update_value ('email_smtpServer', get_parameter('email_smtpServer')))
|
||||||
|
$error_update[] = __('Server SMTP');
|
||||||
|
if (!config_update_value ('email_smtpPort', (int)get_parameter('email_smtpPort')))
|
||||||
|
$error_update[] = __('Port SMTP');
|
||||||
|
if (!config_update_value ('email_username', get_parameter('email_username')))
|
||||||
|
$error_update[] = __('Email user');
|
||||||
|
if (!config_update_value ('email_password', get_parameter('email_password')))
|
||||||
|
$error_update[] = __('Email password');
|
||||||
|
break;
|
||||||
case 'ehorus':
|
case 'ehorus':
|
||||||
if (!config_update_value('ehorus_enabled', (int) get_parameter('ehorus_enabled', $config['ehorus_enabled'])))
|
if (!config_update_value('ehorus_enabled', (int) get_parameter('ehorus_enabled', $config['ehorus_enabled'])))
|
||||||
$error_update[] = __('Enable eHorus');
|
$error_update[] = __('Enable eHorus');
|
||||||
@ -1188,6 +1202,30 @@ function config_process_config () {
|
|||||||
config_update_value ( 'history_db_delay', 0);
|
config_update_value ( 'history_db_delay', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset ($config['email_from_dir'])) {
|
||||||
|
config_update_value ( 'email_from_dir', "pandora@pandorafms.org");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset ($config['email_from_name'])) {
|
||||||
|
config_update_value ( 'email_from_name', "Pandora FMS");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset ($config['email_smtpServer'])) {
|
||||||
|
config_update_value ( 'email_smtpServer', "127.0.0.1");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset ($config['email_smtpPort'])) {
|
||||||
|
config_update_value ( 'email_smtpPort', 25);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset ($config['email_username'])) {
|
||||||
|
config_update_value ( 'email_username', "");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset ($config['email_password'])) {
|
||||||
|
config_update_value ( 'email_password', "");
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset ($config['activate_gis'])) {
|
if (!isset ($config['activate_gis'])) {
|
||||||
config_update_value ( 'activate_gis', 0);
|
config_update_value ( 'activate_gis', 0);
|
||||||
}
|
}
|
||||||
|
@ -36,8 +36,7 @@ function clippy_extension_cron_send_email() {
|
|||||||
'intro' => '<table>' .
|
'intro' => '<table>' .
|
||||||
'<tr>' .
|
'<tr>' .
|
||||||
'<td class="context_help_body">' .
|
'<td class="context_help_body">' .
|
||||||
__('The configuration of email for the task email is in the file:') . '<br />' .
|
__('The configuration of email for the task email is in the mail setup:') . '<br />' .
|
||||||
'<www>/pandora_console/enterprise/extensions/cron/email_config.php <br />' .
|
|
||||||
__('Please check if the email configuration is correct.') .
|
__('Please check if the email configuration is correct.') .
|
||||||
'</td>' .
|
'</td>' .
|
||||||
'</tr>' .
|
'</tr>' .
|
||||||
|
@ -547,6 +547,10 @@ if (! isset ($config['id_user'])) {
|
|||||||
}
|
}
|
||||||
// There is no user connected
|
// There is no user connected
|
||||||
else {
|
else {
|
||||||
|
if ($config['enterprise_installed']) {
|
||||||
|
enterprise_include_once ('include/functions_reset_pass.php');
|
||||||
|
}
|
||||||
|
|
||||||
$correct_pass_change = (boolean)get_parameter('correct_pass_change', 0);
|
$correct_pass_change = (boolean)get_parameter('correct_pass_change', 0);
|
||||||
$reset = (boolean)get_parameter('reset', 0);
|
$reset = (boolean)get_parameter('reset', 0);
|
||||||
$first = (boolean)get_parameter('first', 0);
|
$first = (boolean)get_parameter('first', 0);
|
||||||
@ -599,9 +603,6 @@ if (! isset ($config['id_user'])) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ($config['enterprise_installed']) {
|
|
||||||
enterprise_include_once ('include/functions_reset_pass.php');
|
|
||||||
}
|
|
||||||
if (!$reset) {
|
if (!$reset) {
|
||||||
require_once ('general/login_page.php');
|
require_once ('general/login_page.php');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user