aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_messenger.php
diff options
context:
space:
mode:
authorMartin Beckmann <gn#36@phpbb.de>2016-02-02 15:49:36 +0100
committerMartin Beckmann <gn#36@phpbb.de>2016-02-02 20:30:57 +0100
commita35314c6ea38cfe3878fe68ac3d0453caafe30e1 (patch)
tree5571311bfc81ca8fe920364bd9f6f285f97b93bf /phpBB/includes/functions_messenger.php
parentfdd5a1876388e20b8b79f39bdc6e63c1ce964a91 (diff)
downloadforums-a35314c6ea38cfe3878fe68ac3d0453caafe30e1.tar
forums-a35314c6ea38cfe3878fe68ac3d0453caafe30e1.tar.gz
forums-a35314c6ea38cfe3878fe68ac3d0453caafe30e1.tar.bz2
forums-a35314c6ea38cfe3878fe68ac3d0453caafe30e1.tar.xz
forums-a35314c6ea38cfe3878fe68ac3d0453caafe30e1.zip
[ticket/14443] Avoid duplicate slashes
PHPBB3-14443
Diffstat (limited to 'phpBB/includes/functions_messenger.php')
-rw-r--r--phpBB/includes/functions_messenger.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 1f70b64ea8..6cef791814 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -214,6 +214,8 @@ class messenger
{
global $config, $phpbb_root_path, $phpEx, $user, $phpbb_extension_manager;
+ $template_dir_prefix = (!$template_dir_prefix || substr($template_dir_prefix, 0, 1) === '/') ? $template_dir_prefix : '/' . $template_dir_prefix;
+
$this->setup_template();
if (!trim($template_file))
@@ -232,7 +234,7 @@ class messenger
if ($template_path)
{
$template_paths = array(
- $template_path . '/' . $template_dir_prefix,
+ $template_path . $template_dir_prefix,
);
}
else
@@ -241,7 +243,7 @@ class messenger
$template_path .= $template_lang . '/email';
$template_paths = array(
- $template_path . '/' . $template_dir_prefix,
+ $template_path . $template_dir_prefix,
);
// we can only specify default language fallback when the path is not a custom one for which we
@@ -251,14 +253,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_dir_prefix;
+ $template_paths[] = $fallback_template_path . $template_dir_prefix;
}
}
$this->set_template_paths(array(
array(
'name' => $template_lang . '_email',
- 'ext_path' => 'language/' . $template_lang . '/email' . '/' . $template_dir_prefix,
+ 'ext_path' => 'language/' . $template_lang . '/email' . $template_dir_prefix,
),
), $template_paths);