From 7adae349a96d5dffbd47ea5eca1e6bee481b7ce1 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Tue, 1 Jan 2013 20:48:04 -0500 Subject: [ticket/11305] Extract hook finder from cache service. Unlike most other things in cache service, hook finder does not need a database connection. PHPBB3-11305 --- phpBB/common.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/common.php') diff --git a/phpBB/common.php b/phpBB/common.php index 2ed55dfa95..8a8e8fd2f5 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -120,8 +120,9 @@ $phpbb_style = $phpbb_container->get('style'); // 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'))); +$phpbb_hook_finder = new phpbb_hook_finder($phpbb_root_path, $phpEx, $phpbb_container->get('cache.driver')); -foreach ($cache->obtain_hooks() as $hook) +foreach ($phpbb_hook_finder->find() as $hook) { @include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx); } -- cgit v1.2.1