You don't need any of those 3 variables in an event as you just inject those service dependencies into event listener.
What you actually would need is a new event before the
What you actually would need is a new event before the
// Is user able to search? Has search been disabled?
code block with a new variable like $auth_check_override
set to false
by default, and then it's being added to the if
line, so you can change it to true
in the extension to circumvent the whole core code. So it'd look like f.e.Code:
$auth_check_override = false;/*** This event allows you to override serach auth checks** @event core.search_auth_checks_override* @varboolauth_check_overrideWhether or not the search auth check overridden* @since 3.3.14-RC1*/$vars = ['auth_check_override',];extract($phpbb_dispatcher->trigger_event('core.search_auth_checks_override', compact($vars)));// Is user able to search? Has search been disabled?if (!$auth_check_override && (!$auth->acl_get('u_search') || !$auth->acl_getf_global('f_search') || !$config['load_search'])){$template->assign_var('S_NO_SEARCH', true);trigger_error('NO_SEARCH');}
Statistics: Posted by rxu — Thu Oct 17, 2024 3:08 am