diff options
| author | Igor Wiedler <igor@wiedler.ch> | 2012-11-16 01:23:24 +0100 |
|---|---|---|
| committer | Igor Wiedler <igor@wiedler.ch> | 2012-11-16 01:23:24 +0100 |
| commit | 423c79e106e1977d8d1085f6cb7ac9b63be7ec63 (patch) | |
| tree | 75bc997bc880041ec4124f629c54af936ce63e7b /phpBB/includes/functions_container.php | |
| parent | a23eebdb7bb60c4b910357c1e948b97d48071d6a (diff) | |
| parent | f5536354917d0ae9dd5a1f7c842f175478b8f904 (diff) | |
| download | forums-423c79e106e1977d8d1085f6cb7ac9b63be7ec63.tar forums-423c79e106e1977d8d1085f6cb7ac9b63be7ec63.tar.gz forums-423c79e106e1977d8d1085f6cb7ac9b63be7ec63.tar.bz2 forums-423c79e106e1977d8d1085f6cb7ac9b63be7ec63.tar.xz forums-423c79e106e1977d8d1085f6cb7ac9b63be7ec63.zip | |
Merge remote-tracking branch 'upstream/develop' into ticket/11015
* upstream/develop: (22 commits)
[ticket/11206] Remove includes to non-existent files from download/file.php
[ticket/11205] Fix merge conflict in readme.html.
[ticket/11202] Check response success before content assertions.
[ticket/11204] Reindent.
[ticket/11198] Remove additional asterix as /** is doc-block only
[ticket/11200] Add a reminder comment.
[ticket/11202] Custom message does not make sense here, delete it.
[ticket/11202] Check response success before content assertions.
[ticket/11202] Add a heuristic function to check for response success.
[ticket/11200] Make cache available during container construction
[ticket/11199] Match cache purge container files against container_*
[ticket/11199] Purge dumped container correctly on cache purge.
[ticket/11199] Revert merge of 'marc1706/ticket/11199' into develop
[ticket/11199] Cache purge does not remove dumped container
[ticket/11198] Store the swapping partners in vars and simplify the logic
[ticket/11198] Correctly set links after an item is moved up/down with AJAX
[ticket/11197] Prefix the css classes for the small arrow with "arrow"
[ticket/10879] Remove arrow icon from attachment link in editor
[ticket/11195] Condense logic, remove improperly formatted if()
[ticket/11190-develop] Functional tests purge cache before running.
...
Conflicts:
tests/test_framework/phpbb_database_test_connection_manager.php
Diffstat (limited to 'phpBB/includes/functions_container.php')
| -rw-r--r-- | phpBB/includes/functions_container.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/phpBB/includes/functions_container.php b/phpBB/includes/functions_container.php index 1de1d9f7ea..8014574443 100644 --- a/phpBB/includes/functions_container.php +++ b/phpBB/includes/functions_container.php @@ -84,8 +84,13 @@ function phpbb_create_compiled_container(array $extensions, array $passes, $phpb $tmp_container = phpbb_create_container($extensions, $phpbb_root_path, $php_ext); $tmp_container->compile(); + // XXX stop writing to global $cache when + // http://tracker.phpbb.com/browse/PHPBB3-11203 is fixed + $GLOBALS['cache'] = $tmp_container->get('cache'); + $installed_exts = $tmp_container->get('ext.manager')->all_enabled(); + // Now pass the enabled extension paths into the ext compiler extension - $extensions[] = new phpbb_di_extension_ext($tmp_container->get('ext.manager')->all_enabled()); + $extensions[] = new phpbb_di_extension_ext($installed_exts); // Create the final container to be compiled and cached $container = phpbb_create_container($extensions, $phpbb_root_path, $php_ext); @@ -126,15 +131,12 @@ function phpbb_create_dumped_container(array $extensions, array $passes, $phpbb_ function phpbb_create_dumped_container_unless_debug(array $extensions, array $passes, $phpbb_root_path, $php_ext) { - if (defined('DEBUG')) { - return phpbb_create_compiled_container($extensions, $passes, $phpbb_root_path, $php_ext); - } - - return phpbb_create_dumped_container($extensions, $passes, $phpbb_root_path, $php_ext); + $container_factory = defined('DEBUG') ? 'phpbb_create_compiled_container' : 'phpbb_create_dumped_container'; + return $container_factory($extensions, $passes, $phpbb_root_path, $php_ext); } function phpbb_container_filename($phpbb_root_path, $php_ext) { $filename = str_replace(array('/', '.'), array('slash', 'dot'), $phpbb_root_path); - return $phpbb_root_path . 'cache/' . $filename . '_container.' . $php_ext; + return $phpbb_root_path . 'cache/container_' . $filename . '.' . $php_ext; } |
