aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/search.php
diff options
context:
space:
mode:
authorJosh Woody <a_jelly_doughnut@phpbb.com>2010-08-20 14:22:56 -0500
committerJosh Woody <a_jelly_doughnut@phpbb.com>2010-08-20 14:22:56 -0500
commitc901a9eb70b9d66966f853b0381e05bc9f50fb00 (patch)
treeec525fdcba55a1b600d5cb72260c5da019770981 /phpBB/search.php
parent64e6faa877af36f256da12d122e296f45706d359 (diff)
downloadforums-c901a9eb70b9d66966f853b0381e05bc9f50fb00.tar
forums-c901a9eb70b9d66966f853b0381e05bc9f50fb00.tar.gz
forums-c901a9eb70b9d66966f853b0381e05bc9f50fb00.tar.bz2
forums-c901a9eb70b9d66966f853b0381e05bc9f50fb00.tar.xz
forums-c901a9eb70b9d66966f853b0381e05bc9f50fb00.zip
[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
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index 1e1e42d01f..96f320fe9f 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -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)
{