mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
apply 2.0.x change
git-svn-id: file:///svn/phpbb/trunk@3759 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
853cea315f
commit
cd1f9c63d6
1 changed files with 28 additions and 2 deletions
|
@ -38,9 +38,35 @@ 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 = '')
|
||||||
{
|
{
|
||||||
$this->address = $address;
|
global $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 = $config['default_lang'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$language_file = $phpbb_root_path . 'language/' . $template_lang . '/lang_main.' . $phpEx;
|
||||||
|
|
||||||
|
if ( !@file_exists($language_file) )
|
||||||
|
{
|
||||||
|
$language_file = $phpbb_root_path . 'language/' . $config['default_lang'] . '/lang_main.' . $phpEx;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( @file_exists($language_file) )
|
||||||
|
{
|
||||||
|
include($language_file);
|
||||||
|
$this->address .= $lang[$lang_var];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->address .= $address;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set up subject for mail
|
// set up subject for mail
|
||||||
|
|
Loading…
Add table
Reference in a new issue