mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00: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:
parent
0c42dd05df
commit
3617af0360
7 changed files with 51 additions and 11 deletions
|
@ -104,6 +104,8 @@ p,ul,td {font-size:10pt;}
|
||||||
<li>Prevented the ability to apply BBCode to website contents - we will find another EasterEgg</li>
|
<li>Prevented the ability to apply BBCode to website contents - we will find another EasterEgg</li>
|
||||||
<li>Fixed problems with very long user passwords</li>
|
<li>Fixed problems with very long user passwords</li>
|
||||||
<li>Limited username length the strict way - duplicate username registrations should no longer occur</li>
|
<li>Limited username length the strict way - duplicate username registrations should no longer occur</li>
|
||||||
|
<li>Changed split words handling - now foreign characters are indexed correctly, searching for them works too</li>
|
||||||
|
<li>Changed empty email To Field to use a non-disclosure delimiter - Anti-Spam software should handle those mails correctly, they are RFC compliant</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a name="203"></a><h3 class="h3">1.ii. Changes since 2.0.3</h3>
|
<a name="203"></a><h3 class="h3">1.ii. Changes since 2.0.3</h3>
|
||||||
|
|
|
@ -710,7 +710,7 @@ else if ( $group_id )
|
||||||
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\nBcc: " . $email_addresses . "\n";
|
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\nBcc: " . $email_addresses . "\n";
|
||||||
|
|
||||||
$emailer->use_template('group_approved');
|
$emailer->use_template('group_approved');
|
||||||
$emailer->email_address(' ');//$userdata['user_email']
|
$emailer->email_address($lang['Group_approved'] . ':;');//$userdata['user_email']
|
||||||
$emailer->set_subject($lang['Group_approved']);
|
$emailer->set_subject($lang['Group_approved']);
|
||||||
$emailer->extra_headers($email_headers);
|
$emailer->extra_headers($email_headers);
|
||||||
|
|
||||||
|
|
|
@ -57,9 +57,34 @@ class emailer
|
||||||
//
|
//
|
||||||
// Sets an email address to send to
|
// 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 = '';
|
$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;
|
$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))
|
while (list($user_lang, $bcc_list) = each($bcc_list_ary))
|
||||||
{
|
{
|
||||||
$emailer->use_template('topic_notify', $user_lang);
|
$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
|
// The Topic_reply_notification lang string below will be used
|
||||||
// if for some reason the mail template subject cannot be read
|
// if for some reason the mail template subject cannot be read
|
||||||
// ... note it will not necessarily be in the posters own language!
|
// ... 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);
|
$entry = str_replace('*', ' ', $entry);
|
||||||
|
|
||||||
// 'words' that consist of <3 or >20 characters are removed.
|
// '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) )
|
if ( !empty($stopword_list) )
|
||||||
|
|
|
@ -630,7 +630,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
||||||
}
|
}
|
||||||
|
|
||||||
$emailer->use_template("admin_activate", $board_config['default_lang']);
|
$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->set_subject($lang['New_account_subject']);
|
||||||
$emailer->extra_headers($email_headers . "Bcc: $bcc_list\n");
|
$emailer->extra_headers($email_headers . "Bcc: $bcc_list\n");
|
||||||
|
|
||||||
|
|
|
@ -857,6 +857,16 @@ switch ($row['config_value'])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "<h2>Updating version and optimizing tables</h2>\n";
|
||||||
|
echo "<p>Progress :: <b>";
|
||||||
|
flush();
|
||||||
|
|
||||||
|
// update the version
|
||||||
|
$sql = "UPDATE " . CONFIG_TABLE . "
|
||||||
|
SET config_value = '$updates_to_version'
|
||||||
|
WHERE config_name = 'version'";
|
||||||
|
_sql($sql, $errored, $error_ary);
|
||||||
|
|
||||||
// Optimize/vacuum analyze the tables where appropriate
|
// Optimize/vacuum analyze the tables where appropriate
|
||||||
// this should be done for each version in future along with
|
// this should be done for each version in future along with
|
||||||
// the version number update
|
// the version number update
|
||||||
|
@ -873,12 +883,6 @@ switch (SQL_LAYER)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Very last thing, update the version
|
|
||||||
$sql = "UPDATE " . CONFIG_TABLE . "
|
|
||||||
SET config_value = '$updates_to_version'
|
|
||||||
WHERE config_name = 'version'";
|
|
||||||
_sql($sql, $errored, $error_ary);
|
|
||||||
|
|
||||||
echo "</b> <b class=\"ok\">Done</b><br />Result :: \n";
|
echo "</b> <b class=\"ok\">Done</b><br />Result :: \n";
|
||||||
|
|
||||||
if ($errored)
|
if ($errored)
|
||||||
|
|
Loading…
Add table
Reference in a new issue