mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[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
This commit is contained in:
@@ -133,7 +133,8 @@ if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
|
||||
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
|
||||
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
|
||||
|
||||
foreach ($cache->obtain_hooks() as $hook)
|
||||
$phpbb_hook_finder = new phpbb_hook_finder($phpbb_root_path, $phpEx, $phpbb_container->get('cache.driver'));
|
||||
foreach ($phpbb_hook_finder->find() as $hook)
|
||||
{
|
||||
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
|
||||
}
|
||||
|
@@ -199,7 +199,8 @@ if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
|
||||
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
|
||||
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
|
||||
|
||||
foreach ($cache->obtain_hooks() as $hook)
|
||||
$phpbb_hook_finder = new phpbb_hook_finder($phpbb_root_path, $phpEx, $phpbb_container->get('cache.driver'));
|
||||
foreach ($phpbb_hook_finder->find() as $hook)
|
||||
{
|
||||
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
|
||||
}
|
||||
|
Reference in New Issue
Block a user