aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_url_matcher.php
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-11-11 17:59:41 +0100
committerTristan Darricau <github@nicofuma.fr>2014-11-20 21:01:01 +0100
commitacc91a2bbf28656d4a6917b457ba3dd6b4e02e37 (patch)
treedda36370c55d09650d5f8a41ea69105af7b39cb8 /phpBB/includes/functions_url_matcher.php
parentc98efc53a80150b6f9189c9b194855c748e9b03d (diff)
downloadforums-acc91a2bbf28656d4a6917b457ba3dd6b4e02e37.tar
forums-acc91a2bbf28656d4a6917b457ba3dd6b4e02e37.tar.gz
forums-acc91a2bbf28656d4a6917b457ba3dd6b4e02e37.tar.bz2
forums-acc91a2bbf28656d4a6917b457ba3dd6b4e02e37.tar.xz
forums-acc91a2bbf28656d4a6917b457ba3dd6b4e02e37.zip
[ticket/12620] Use the container to get the environment name
PHPBB3-12620
Diffstat (limited to 'phpBB/includes/functions_url_matcher.php')
-rw-r--r--phpBB/includes/functions_url_matcher.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/includes/functions_url_matcher.php b/phpBB/includes/functions_url_matcher.php
index c06f4f6cb1..4f5ead6253 100644
--- a/phpBB/includes/functions_url_matcher.php
+++ b/phpBB/includes/functions_url_matcher.php
@@ -35,7 +35,9 @@ if (!defined('IN_PHPBB'))
*/
function phpbb_get_url_matcher(\phpbb\extension\manager $manager, RequestContext $context, $root_path, $php_ext)
{
- $config_cache = new ConfigCache($root_path . 'cache/' . PHPBB_ENVIRONMENT . '/url_matcher.' . $php_ext, defined('DEBUG'));
+ global $phpbb_container;
+
+ $config_cache = new ConfigCache($root_path . 'cache/' . $phpbb_container->getParameter('core.environment') . '/url_matcher.' . $php_ext, defined('DEBUG'));
if (!$config_cache->isFresh())
{
phpbb_create_dumped_url_matcher($manager, $root_path, $config_cache);
@@ -90,6 +92,8 @@ function phpbb_create_url_matcher(\phpbb\extension\manager $manager, RequestCont
*/
function phpbb_load_url_matcher(RequestContext $context, $root_path, $php_ext)
{
- require($root_path . 'cache/' . PHPBB_ENVIRONMENT . '/url_matcher.' . $php_ext);
+ global $phpbb_container;
+
+ require($root_path . 'cache/' . $phpbb_container->getParameter('core.environment') . '/url_matcher.' . $php_ext);
return new phpbb_url_matcher($context);
}