allow custom template path for email files

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9957 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2009-08-11 16:24:18 +00:00
parent 96a30afcca
commit be963ed938

View file

@ -173,7 +173,7 @@ class messenger
/** /**
* Set email template to use * Set email template to use
*/ */
function template($template_file, $template_lang = '') function template($template_file, $template_lang = '', $template_path = '')
{ {
global $config, $phpbb_root_path, $user; global $config, $phpbb_root_path, $user;
@ -193,8 +193,11 @@ class messenger
$this->tpl_msg[$template_lang . $template_file] = new template(); $this->tpl_msg[$template_lang . $template_file] = new template();
$tpl = &$this->tpl_msg[$template_lang . $template_file]; $tpl = &$this->tpl_msg[$template_lang . $template_file];
$template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/'; if (!$template_path)
$template_path .= $template_lang . '/email'; {
$template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
$template_path .= $template_lang . '/email';
}
$tpl->set_custom_template($template_path, $template_lang . '_email'); $tpl->set_custom_template($template_path, $template_lang . '_email');