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:
Meik Sievertsen 2003-03-30 17:48:37 +00:00
parent 0c42dd05df
commit 3617af0360
7 changed files with 51 additions and 11 deletions

View file

@ -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>Fixed problems with very long user passwords</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>
<a name="203"></a><h3 class="h3">1.ii. Changes since 2.0.3</h3>

View file

@ -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";
$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->extra_headers($email_headers);

View file

@ -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;
}

View file

@ -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!

View file

@ -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) )

View file

@ -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");

View file

@ -857,6 +857,16 @@ switch ($row['config_value'])
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
// this should be done for each version in future along with
// the version number update
@ -873,12 +883,6 @@ switch (SQL_LAYER)
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 &nbsp; :: \n";
if ($errored)