aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_messenger.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_messenger.php')
-rw-r--r--phpBB/includes/functions_messenger.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index f4e49b1b18..f608c95fe4 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -201,17 +201,18 @@ class messenger
{
// fall back to board default language if the user's language is
// missing $template_file. If this does not exist either,
- // $tpl->set_custom_template will do a trigger_error
+ // $tpl->set_filenames will do a trigger_error
$template_lang = basename($config['default_lang']);
}
// tpl_msg now holds a template object we can use to parse the template file
if (!isset($this->tpl_msg[$template_lang . $template_file]))
{
- $template_locator = new phpbb_template_locator();
- $template_path_provider = new phpbb_template_extension_path_provider($phpbb_extension_manager, new phpbb_template_path_provider());
- $this->tpl_msg[$template_lang . $template_file] = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $template_locator, $template_path_provider);
- $tpl = &$this->tpl_msg[$template_lang . $template_file];
+ $style_resource_locator = new phpbb_style_resource_locator();
+ $style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider());
+ $tpl = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider);
+ $style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $tpl);
+ $this->tpl_msg[$template_lang . $template_file] = $tpl;
$fallback_template_path = false;
@@ -229,7 +230,7 @@ class messenger
}
}
- $tpl->set_custom_template($template_path, $template_lang . '_email', $fallback_template_path);
+ $style->set_custom_style($template_lang . '_email', array($template_path, $fallback_template_path), '');
$tpl->set_filenames(array(
'body' => $template_file . '.txt',