mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 08:25:42 +02:00
[ticket/14443] Avoid duplicate slashes
PHPBB3-14443
This commit is contained in:
parent
fdd5a18763
commit
a35314c6ea
@ -214,6 +214,8 @@ class messenger
|
|||||||
{
|
{
|
||||||
global $config, $phpbb_root_path, $phpEx, $user, $phpbb_extension_manager;
|
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();
|
$this->setup_template();
|
||||||
|
|
||||||
if (!trim($template_file))
|
if (!trim($template_file))
|
||||||
@ -232,7 +234,7 @@ class messenger
|
|||||||
if ($template_path)
|
if ($template_path)
|
||||||
{
|
{
|
||||||
$template_paths = array(
|
$template_paths = array(
|
||||||
$template_path . '/' . $template_dir_prefix,
|
$template_path . $template_dir_prefix,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -241,7 +243,7 @@ class messenger
|
|||||||
$template_path .= $template_lang . '/email';
|
$template_path .= $template_lang . '/email';
|
||||||
|
|
||||||
$template_paths = array(
|
$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
|
// 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 = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
|
||||||
$fallback_template_path .= basename($config['default_lang']) . '/email';
|
$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(
|
$this->set_template_paths(array(
|
||||||
array(
|
array(
|
||||||
'name' => $template_lang . '_email',
|
'name' => $template_lang . '_email',
|
||||||
'ext_path' => 'language/' . $template_lang . '/email' . '/' . $template_dir_prefix,
|
'ext_path' => 'language/' . $template_lang . '/email' . $template_dir_prefix,
|
||||||
),
|
),
|
||||||
), $template_paths);
|
), $template_paths);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user