mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
more changes/fixes. New mail handling should be tested by those persons experienced problems with anti spam software and empty To Fields.
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3758 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -57,9 +57,34 @@ class emailer
|
||||
//
|
||||
// Sets an email address to send to
|
||||
//
|
||||
function email_address($address)
|
||||
function email_address($address, $lang_var = '', $template_lang = '')
|
||||
{
|
||||
global $board_config, $phpbb_root_path, $phpEx;
|
||||
|
||||
$this->address = '';
|
||||
|
||||
// If a language variable for non-disclosure is passed, we prepend it to the address.
|
||||
if ($lang_var != '')
|
||||
{
|
||||
if ( $template_lang == '' )
|
||||
{
|
||||
$template_lang = $board_config['default_lang'];
|
||||
}
|
||||
|
||||
$language_file = @phpbb_realpath($phpbb_root_path . 'language/lang_' . $template_lang . '/lang_main.' . $phpEx);
|
||||
|
||||
if ( !@file_exists(@phpbb_realpath($language_file)) )
|
||||
{
|
||||
$language_file = @phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);
|
||||
}
|
||||
|
||||
if ( @file_exists(@phpbb_realpath($language_file)) )
|
||||
{
|
||||
include($language_file);
|
||||
$this->address .= $lang[$lang_var];
|
||||
}
|
||||
}
|
||||
|
||||
$this->address .= $address;
|
||||
}
|
||||
|
||||
|
@@ -671,7 +671,7 @@ function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topi
|
||||
while (list($user_lang, $bcc_list) = each($bcc_list_ary))
|
||||
{
|
||||
$emailer->use_template('topic_notify', $user_lang);
|
||||
$emailer->email_address(' ');
|
||||
$emailer->email_address(':;', 'Topic_reply_notification', $user_lang);
|
||||
// The Topic_reply_notification lang string below will be used
|
||||
// if for some reason the mail template subject cannot be read
|
||||
// ... note it will not necessarily be in the posters own language!
|
||||
|
@@ -58,7 +58,16 @@ function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
|
||||
$entry = str_replace('*', ' ', $entry);
|
||||
|
||||
// 'words' that consist of <3 or >20 characters are removed.
|
||||
$entry = preg_replace('/\b([a-z0-9]{1,2}|[a-z0-9]{21,})\b/',' ', $entry);
|
||||
$entry = explode(' ', $entry);
|
||||
for ($i = 0; $i < sizeof($entry); $i++)
|
||||
{
|
||||
$entry[$i] = trim($entry[$i]);
|
||||
if ((strlen($entry[$i]) < 3) || (strlen($entry[$i]) > 20))
|
||||
{
|
||||
$entry[$i] = '';
|
||||
}
|
||||
}
|
||||
$entry = implode(' ', $entry);
|
||||
}
|
||||
|
||||
if ( !empty($stopword_list) )
|
||||
|
@@ -630,7 +630,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
||||
}
|
||||
|
||||
$emailer->use_template("admin_activate", $board_config['default_lang']);
|
||||
$emailer->email_address(' ');
|
||||
$emailer->email_address($lang['New_account_subject'] . ':;');
|
||||
$emailer->set_subject($lang['New_account_subject']);
|
||||
$emailer->extra_headers($email_headers . "Bcc: $bcc_list\n");
|
||||
|
||||
|
Reference in New Issue
Block a user