Skip to content

Commit

Permalink
Merge branch '3.3.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
marc1706 committed Oct 20, 2024
2 parents 167a7fc + aa21aff commit 6443796
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion phpBB/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,21 @@
break;
}

$search_auth_check_override = false;
/**
* This event allows you to override search auth checks
*
* @event core.search_auth_check_override
* @var bool search_auth_check_override Whether or not the search auth check overridden
* @since 3.3.14-RC1
*/
$vars = [
'search_auth_check_override',
];
extract($phpbb_dispatcher->trigger_event('core.search_auth_check_override', compact($vars)));

// Is user able to search? Has search been disabled?
if (!$auth->acl_get('u_search') || !$auth->acl_getf_global('f_search') || !$config['load_search'])
if (!$search_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');
Expand Down

0 comments on commit 6443796

Please sign in to comment.