mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-28 20:29:58 +03:00
Resolved Issue ID 0000507:
o format of email o max_execution_time equal to 0 o -f with only adress mail o use of standard function get_webmaster_mail_address 2 news $conf parameters. Merge branch-1_6 r1529:1530 into BSF git-svn-id: http://piwigo.org/svn/trunk@1531 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
9d38573074
commit
e097dba6a6
4 changed files with 38 additions and 17 deletions
|
@ -34,6 +34,15 @@ $env_nbm = array
|
||||||
'is_sendmail_timeout' => false
|
'is_sendmail_timeout' => false
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
(!isset($env_nbm['sendmail_timeout'])) or
|
||||||
|
(!is_numeric($env_nbm['sendmail_timeout'])) or
|
||||||
|
($env_nbm['sendmail_timeout'] <= 0)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
$env_nbm['sendmail_timeout'] = $conf['nbm_treatment_timeout_default'];
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Search an available check_key
|
* Search an available check_key
|
||||||
|
|
|
@ -205,6 +205,12 @@ $conf['mail_options'] = false;
|
||||||
// or test.
|
// or test.
|
||||||
$conf['send_bcc_mail_webmaster'] = false;
|
$conf['send_bcc_mail_webmaster'] = false;
|
||||||
|
|
||||||
|
// enabled_format_email:
|
||||||
|
// on true email will be formatted with name and address
|
||||||
|
// on false email will be only address
|
||||||
|
// There are webhosting wich not allow email formatted (Lycos, ...)
|
||||||
|
$conf['enabled_format_email'] = true;
|
||||||
|
|
||||||
// check_upgrade_feed: check if there are database upgrade required. Set to
|
// check_upgrade_feed: check if there are database upgrade required. Set to
|
||||||
// true, a message will strongly encourage you to upgrade your database if
|
// true, a message will strongly encourage you to upgrade your database if
|
||||||
// needed.
|
// needed.
|
||||||
|
@ -478,13 +484,18 @@ $conf['tags_levels'] = 5;
|
||||||
// Default Value for nbm user
|
// Default Value for nbm user
|
||||||
$conf['nbm_default_value_user_enabled'] = false;
|
$conf['nbm_default_value_user_enabled'] = false;
|
||||||
|
|
||||||
// Search List user to send with quick (List all without check news)
|
// Search list user to send quickly (List all without to check news)
|
||||||
// More quickly but less fun to use
|
// More quickly but less fun to use
|
||||||
$conf['nbm_list_all_enabled_users_to_send'] = false;
|
$conf['nbm_list_all_enabled_users_to_send'] = false;
|
||||||
|
|
||||||
// Max mails sended on one pass
|
// Max time used on one pass in order to send mails.
|
||||||
|
// Timeout delay ratio.
|
||||||
$conf['nbm_max_treatment_timeout_percent'] = 0.8;
|
$conf['nbm_max_treatment_timeout_percent'] = 0.8;
|
||||||
|
|
||||||
|
// If timeout cannot be compite with nbm_max_treatment_timeout_percent,
|
||||||
|
// nbm_treatment_timeout_default is used by default
|
||||||
|
$conf['nbm_treatment_timeout_default'] = 20;
|
||||||
|
|
||||||
// +-----------------------------------------------------------------------+
|
// +-----------------------------------------------------------------------+
|
||||||
// | Set default admin layout |
|
// | Set default admin layout |
|
||||||
// +-----------------------------------------------------------------------+
|
// +-----------------------------------------------------------------------+
|
||||||
|
|
|
@ -77,6 +77,10 @@ function get_mail_configuration()
|
||||||
* @param string email
|
* @param string email
|
||||||
*/
|
*/
|
||||||
function format_email($name, $email)
|
function format_email($name, $email)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
|
if ($conf['enabled_format_email'])
|
||||||
{
|
{
|
||||||
$cvt7b_name = str_translate_to_ascii7bits($name);
|
$cvt7b_name = str_translate_to_ascii7bits($name);
|
||||||
|
|
||||||
|
@ -89,6 +93,11 @@ function format_email($name, $email)
|
||||||
return $cvt7b_name.$email;
|
return $cvt7b_name.$email;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return $email;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sends an email, using PhpWebGallery specific informations
|
* sends an email, using PhpWebGallery specific informations
|
||||||
|
@ -128,7 +137,7 @@ function pwg_mail($to, $from = '', $subject = 'PhpWebGallery', $infos = '')
|
||||||
|
|
||||||
if ($conf_mail['mail_options'])
|
if ($conf_mail['mail_options'])
|
||||||
{
|
{
|
||||||
$options = '-f '.$from;
|
$options = '-f '.$conf_mail['email_webmaster'];
|
||||||
|
|
||||||
return mail($to, $cvt7b_subject, $content, $headers, $options);
|
return mail($to, $cvt7b_subject, $content, $headers, $options);
|
||||||
}
|
}
|
||||||
|
|
12
password.php
12
password.php
|
@ -42,16 +42,8 @@ $page['infos'] = array();
|
||||||
|
|
||||||
if (isset($_POST['submit']))
|
if (isset($_POST['submit']))
|
||||||
{
|
{
|
||||||
// in case of error, creation of mailto link
|
|
||||||
$query = '
|
|
||||||
SELECT '.$conf['user_fields']['email'].'
|
|
||||||
FROM '.USERS_TABLE.'
|
|
||||||
WHERE '.$conf['user_fields']['id'].' = '.$conf['webmaster_id'].'
|
|
||||||
;';
|
|
||||||
list($mail_webmaster) = mysql_fetch_array(pwg_query($query));
|
|
||||||
|
|
||||||
$mailto =
|
$mailto =
|
||||||
'<a href="mailto:'.$mail_webmaster.'">'
|
'<a href="mailto:'.get_webmaster_mail_address().'">'
|
||||||
.l10n('Contact webmaster')
|
.l10n('Contact webmaster')
|
||||||
.'</a>'
|
.'</a>'
|
||||||
;
|
;
|
||||||
|
@ -92,7 +84,7 @@ WHERE '
|
||||||
."\n".l10n('Password').': '.$new_password
|
."\n".l10n('Password').': '.$new_password
|
||||||
;
|
;
|
||||||
|
|
||||||
if (pwg_mail($row['email'], $mail_webmaster, l10n('password updated'), $infos))
|
if (pwg_mail($row['email'], '', l10n('password updated'), $infos))
|
||||||
{
|
{
|
||||||
$data =
|
$data =
|
||||||
array(
|
array(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue