aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2010-09-02 17:35:44 +0200
committerAndreas Fischer <bantu@phpbb.com>2010-09-02 17:35:44 +0200
commitea4d204cf68b3cee2bfb0633085e4ebdadeb3a80 (patch)
tree200765b027893692ce5e8fdd6425d7500b58c93a
parentf1550a65b53fb64b438d5c15ef83bf4e63dafa5f (diff)
parentba0072080d591d2d01cae89872a9da035a0ec401 (diff)
downloadforums-ea4d204cf68b3cee2bfb0633085e4ebdadeb3a80.tar
forums-ea4d204cf68b3cee2bfb0633085e4ebdadeb3a80.tar.gz
forums-ea4d204cf68b3cee2bfb0633085e4ebdadeb3a80.tar.bz2
forums-ea4d204cf68b3cee2bfb0633085e4ebdadeb3a80.tar.xz
forums-ea4d204cf68b3cee2bfb0633085e4ebdadeb3a80.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/9662] Search flood interval no longer applies to non-keyword searches [ticket/9615] magic_quotes_gpc: call stripslashes() before utf8_basename()
-rw-r--r--phpBB/includes/functions_upload.php5
-rw-r--r--phpBB/search.php5
2 files changed, 6 insertions, 4 deletions
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index 51fed45ebd..7f09cc1640 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -58,8 +58,9 @@ class filespec
$this->filename = $upload_ary['tmp_name'];
$this->filesize = $upload_ary['size'];
- $name = trim(utf8_htmlspecialchars(utf8_basename($upload_ary['name'])));
- $this->realname = $this->uploadname = (STRIP) ? stripslashes($name) : $name;
+ $name = (STRIP) ? stripslashes($upload_ary['name']) : $upload_ary['name'];
+ $name = trim(utf8_htmlspecialchars(utf8_basename($name)));
+ $this->realname = $this->uploadname = $name;
$this->mimetype = $upload_ary['type'];
// Opera adds the name to the mime type
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)
{