aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-02-28 10:15:47 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-02-28 10:15:47 +0100
commitb490be1f8112a2770f5a34c0c4336477f7b094aa (patch)
tree92acf5d793762457770e2067d9bdf8ffe404aa5d /phpBB/includes
parentcb6ae863f56efe62b1f5c5d4ea3a9e3a12cf4c7b (diff)
parenta4040e53b72620bc55327d1074a36e2782fc4426 (diff)
downloadforums-b490be1f8112a2770f5a34c0c4336477f7b094aa.tar
forums-b490be1f8112a2770f5a34c0c4336477f7b094aa.tar.gz
forums-b490be1f8112a2770f5a34c0c4336477f7b094aa.tar.bz2
forums-b490be1f8112a2770f5a34c0c4336477f7b094aa.tar.xz
forums-b490be1f8112a2770f5a34c0c4336477f7b094aa.zip
Merge branch '3.1.x' into 3.2.x
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_messenger.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 7ed9a772ec..e8d4e0d7f1 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -204,10 +204,12 @@ class messenger
/**
* Set email template to use
*/
- function template($template_file, $template_lang = '', $template_path = '')
+ function template($template_file, $template_lang = '', $template_path = '', $template_dir_prefix = '')
{
global $config, $phpbb_root_path, $user;
+ $template_dir_prefix = (!$template_dir_prefix || $template_dir_prefix[0] === '/') ? $template_dir_prefix : '/' . $template_dir_prefix;
+
$this->setup_template();
if (!trim($template_file))
@@ -226,7 +228,7 @@ class messenger
if ($template_path)
{
$template_paths = array(
- $template_path,
+ $template_path . $template_dir_prefix,
);
}
else
@@ -235,7 +237,7 @@ class messenger
$template_path .= $template_lang . '/email';
$template_paths = array(
- $template_path,
+ $template_path . $template_dir_prefix,
);
// we can only specify default language fallback when the path is not a custom one for which we
@@ -245,14 +247,14 @@ class messenger
$fallback_template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
$fallback_template_path .= basename($config['default_lang']) . '/email';
- $template_paths[] = $fallback_template_path;
+ $template_paths[] = $fallback_template_path . $template_dir_prefix;
}
}
$this->set_template_paths(array(
array(
'name' => $template_lang . '_email',
- 'ext_path' => 'language/' . $template_lang . '/email'
+ 'ext_path' => 'language/' . $template_lang . '/email' . $template_dir_prefix,
),
), $template_paths);