From d543f0ffb1334d0a22c30077a9ed27c098dc4af5 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sat, 8 Sep 2012 14:41:41 +0200 Subject: [ticket/11101] Delay execution of container processors Also fix the name of the ext processor service. PHPBB3-11101 --- phpBB/common.php | 14 +++++++------- phpBB/config/services.yml | 2 +- phpBB/download/file.php | 14 +++++++------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/phpBB/common.php b/phpBB/common.php index 281eb88c4d..c6bb5c6cfe 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -100,13 +100,6 @@ $processor->process($phpbb_container); $phpbb_class_loader = $phpbb_container->get('class_loader'); $phpbb_class_loader_ext = $phpbb_container->get('class_loader.ext'); -$ids = array_keys($phpbb_container->findTaggedServiceIds('container.processor')); -foreach ($ids as $id) -{ - $processor = $phpbb_container->get($id); - $processor->process($phpbb_container); -} - // set up caching $cache = $phpbb_container->get('cache'); @@ -132,6 +125,13 @@ $phpbb_subscriber_loader = $phpbb_container->get('event.subscriber_loader'); $template = $phpbb_container->get('template'); $phpbb_style = $phpbb_container->get('style'); +$ids = array_keys($phpbb_container->findTaggedServiceIds('container.processor')); +foreach ($ids as $id) +{ + $processor = $phpbb_container->get($id); + $processor->process($phpbb_container); +} + // Add own hook handler require($phpbb_root_path . 'includes/hooks/index.' . $phpEx); $phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('phpbb_template', 'display'))); diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml index 133a43b77e..c3d2494952 100644 --- a/phpBB/config/services.yml +++ b/phpBB/config/services.yml @@ -89,7 +89,7 @@ services: - .%core.php_ext% - @cache.driver - processor.config: + processor.ext: class: phpbb_di_processor_ext arguments: - @ext.manager diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 8766c6d030..7ed53d54b6 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -61,13 +61,6 @@ if (isset($_GET['avatar'])) $phpbb_class_loader = $phpbb_container->get('class_loader'); $phpbb_class_loader_ext = $phpbb_container->get('class_loader.ext'); - $ids = array_keys($phpbb_container->findTaggedServiceIds('container.processor')); - foreach ($ids as $id) - { - $processor = $phpbb_container->get($id); - $processor->process($phpbb_container); - } - // set up caching $cache = $phpbb_container->get('cache'); @@ -92,6 +85,13 @@ if (isset($_GET['avatar'])) $phpbb_extension_manager = $phpbb_container->get('ext.manager'); $phpbb_subscriber_loader = $phpbb_container->get('event.subscriber_loader'); + $ids = array_keys($phpbb_container->findTaggedServiceIds('container.processor')); + foreach ($ids as $id) + { + $processor = $phpbb_container->get($id); + $processor->process($phpbb_container); + } + // worst-case default $browser = strtolower($request->header('User-Agent', 'msie 6.0')); -- cgit v1.2.1