aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-05-13 23:39:42 +0200
committerTristan Darricau <github@nicofuma.fr>2014-05-13 23:39:42 +0200
commit1e427fa031eea8dd6a1e04f1407f996d1d948203 (patch)
tree68c90aae0216728dd8427b05294bf7c57505159b /phpBB
parent910b9b59b39ffab0614a310cfa9ddcf42723fe89 (diff)
downloadforums-1e427fa031eea8dd6a1e04f1407f996d1d948203.tar
forums-1e427fa031eea8dd6a1e04f1407f996d1d948203.tar.gz
forums-1e427fa031eea8dd6a1e04f1407f996d1d948203.tar.bz2
forums-1e427fa031eea8dd6a1e04f1407f996d1d948203.tar.xz
forums-1e427fa031eea8dd6a1e04f1407f996d1d948203.zip
[ticket/12509] Fix the call to set_custom_file in adm/index and messenger
PHPBB3-12509
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/index.php6
-rw-r--r--phpBB/includes/functions_messenger.php6
-rw-r--r--phpBB/phpbb/template/twig/twig.php14
3 files changed, 19 insertions, 7 deletions
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php
index 973ce8fe5d..31965cec28 100644
--- a/phpBB/adm/index.php
+++ b/phpBB/adm/index.php
@@ -51,8 +51,10 @@ $mode = request_var('mode', '');
// Set custom style for admin area
$template->set_custom_style(array(
- 'name' => 'adm',
- 'ex_path' => 'adm/',
+ array(
+ 'name' => 'adm',
+ 'ex_path' => 'adm/',
+ )
), $phpbb_admin_path . 'style');
$template->assign_var('T_ASSETS_PATH', $phpbb_root_path . 'assets');
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index bc5937fdc4..482f95dd99 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -253,8 +253,10 @@ class messenger
}
$this->set_template_paths(array(
- 'name' => $template_lang . '_email',
- 'ext_path' => 'language/' . $template_lang . '/email'
+ array(
+ 'name' => $template_lang . '_email',
+ 'ext_path' => 'language/' . $template_lang . '/email'
+ )
), $template_paths);
$this->template->set_filenames(array(
diff --git a/phpBB/phpbb/template/twig/twig.php b/phpBB/phpbb/template/twig/twig.php
index 9e5a572cb5..a084245918 100644
--- a/phpBB/phpbb/template/twig/twig.php
+++ b/phpBB/phpbb/template/twig/twig.php
@@ -236,10 +236,18 @@ class twig extends \phpbb\template\base
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'];
- $ext_style_path = dirname($ext_style_template_path);
+ if (isset($template_dir['ext_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
{