aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-08-10 02:26:16 +0200
committerTristan Darricau <github@nicofuma.fr>2014-08-10 03:32:27 +0200
commite7e6d45789d4084b98a9c6227a42976e4a1d8f7f (patch)
tree9ede14c36b2bd9f9ee1ef0ac3b2b563ec4d0d4cf /phpBB/install
parent59b5ab4866e4c687c9157898110fd0e556f6c6ac (diff)
downloadforums-e7e6d45789d4084b98a9c6227a42976e4a1d8f7f.tar
forums-e7e6d45789d4084b98a9c6227a42976e4a1d8f7f.tar.gz
forums-e7e6d45789d4084b98a9c6227a42976e4a1d8f7f.tar.bz2
forums-e7e6d45789d4084b98a9c6227a42976e4a1d8f7f.tar.xz
forums-e7e6d45789d4084b98a9c6227a42976e4a1d8f7f.zip
[ticket/12957] Update the constructions of the template engine
PHPBB3-12957
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/index.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 395aff6c7d..3d5e546ffb 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -137,6 +137,7 @@ $phpbb_container_builder->set_custom_parameters(array(
$phpbb_container = $phpbb_container_builder->get_container();
$phpbb_container->register('dbal.conn.driver')->setSynthetic(true);
+$phpbb_container->register('template.twig.environment')->setSynthetic(true);
$phpbb_container->compile();
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
@@ -268,7 +269,28 @@ $config = new \phpbb\config\config(array(
$symfony_request = $phpbb_container->get('symfony_request');
$phpbb_filesystem = $phpbb_container->get('filesystem');
$phpbb_path_helper = $phpbb_container->get('path_helper');
-$template = new \phpbb\template\twig\twig($phpbb_path_helper, $config, $user, new \phpbb\template\context());
+$cache_path = $phpbb_root_path . 'cache/';
+
+$twig_environment = new \phpbb\template\twig\environment(
+ $config,
+ $phpbb_path_helper,
+ $phpbb_container,
+ $cache_path,
+ null,
+ $phpbb_container->get('template.twig.loader')
+);
+
+$phpbb_container->set('template.twig.environment', $twig_environment);
+$template = new \phpbb\template\twig\twig(
+ $phpbb_path_helper,
+ $config,
+ $user,
+ new \phpbb\template\context(),
+ $twig_environment,
+ $cache_path,
+ array($phpbb_container->get('template.twig.extensions.phpbb'))
+);
+
$paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style');
$paths = array_filter($paths, 'is_dir');
$template->set_custom_style(array(