[ticket/12509] Fix the call to set_custom_file in adm/index and messenger

PHPBB3-12509
This commit is contained in:
Tristan Darricau 2014-05-13 23:39:42 +02:00
parent 910b9b59b3
commit 1e427fa031
3 changed files with 19 additions and 7 deletions

View file

@ -51,8 +51,10 @@ $mode = request_var('mode', '');
// Set custom style for admin area // Set custom style for admin area
$template->set_custom_style(array( $template->set_custom_style(array(
'name' => 'adm', array(
'ex_path' => 'adm/', 'name' => 'adm',
'ex_path' => 'adm/',
)
), $phpbb_admin_path . 'style'); ), $phpbb_admin_path . 'style');
$template->assign_var('T_ASSETS_PATH', $phpbb_root_path . 'assets'); $template->assign_var('T_ASSETS_PATH', $phpbb_root_path . 'assets');

View file

@ -253,8 +253,10 @@ class messenger
} }
$this->set_template_paths(array( $this->set_template_paths(array(
'name' => $template_lang . '_email', array(
'ext_path' => 'language/' . $template_lang . '/email' 'name' => $template_lang . '_email',
'ext_path' => 'language/' . $template_lang . '/email'
)
), $template_paths); ), $template_paths);
$this->template->set_filenames(array( $this->template->set_filenames(array(

View file

@ -236,10 +236,18 @@ class twig extends \phpbb\template\base
foreach ($names as $template_dir) foreach ($names as $template_dir)
{ {
if (is_array($template_dir) && isset($template_dir['ext_path'])) if (is_array($template_dir))
{ {
$ext_style_template_path = $ext_path . $template_dir['ext_path']; if (isset($template_dir['ext_path']))
$ext_style_path = dirname($ext_style_template_path); {
$ext_style_template_path = $ext_path . $template_dir['ext_path'];
$ext_style_path = dirname($ext_style_template_path);
}
else
{
$ext_style_path = $ext_path . 'styles/' . $template_dir['name'] . '/';
$ext_style_template_path = $ext_style_path . 'template/';
}
} }
else else
{ {