mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-19 07:08:09 +01:00
[ticket/9662] Search flood interval no longer applies to non-keyword searches
The search interval was not consistently applied to "special" searches like "unread posts" and "view your topics." Now the special searches are always exempt from the flood interval. PHPBB3-9662
This commit is contained in:
parent
64e6faa877
commit
c901a9eb70
@ -81,9 +81,10 @@ if ($user->load && $config['limit_search_load'] && ($user->load > doubleval($con
|
||||
trigger_error('NO_SEARCH_TIME');
|
||||
}
|
||||
|
||||
// Check flood limit ... if applicable
|
||||
// It is applicable if the configuration setting is non-zero, and the user cannot
|
||||
// ignore the flood setting, and the search is a keyword search.
|
||||
$interval = ($user->data['user_id'] == ANONYMOUS) ? $config['search_anonymous_interval'] : $config['search_interval'];
|
||||
if ($interval && !$auth->acl_get('u_ignoreflood'))
|
||||
if ($interval && !in_array($search_id, array('unreadposts', 'unanswered', 'active_topics', 'egosearch')) && !$auth->acl_get('u_ignoreflood'))
|
||||
{
|
||||
if ($user->data['user_last_search'] > time() - $interval)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user