aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-04-10 19:11:09 +0000
committerLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-04-10 19:11:09 +0000
commitf2d09291474030c949a19e823d83fb62c09a0b54 (patch)
tree3d5cf2c579b19c6e5efc048a21422255054a31ee /phpBB/posting.php
parent73b191a343a67356b788f84185df89d76aef2ce7 (diff)
downloadforums-f2d09291474030c949a19e823d83fb62c09a0b54.tar
forums-f2d09291474030c949a19e823d83fb62c09a0b54.tar.gz
forums-f2d09291474030c949a19e823d83fb62c09a0b54.tar.bz2
forums-f2d09291474030c949a19e823d83fb62c09a0b54.tar.xz
forums-f2d09291474030c949a19e823d83fb62c09a0b54.zip
Moved up flood-check a little to save a query whenever possible
git-svn-id: file:///svn/phpbb/trunk@3806 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index b3e1f7dcfd..a3d81beae9 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -495,7 +495,7 @@ if (($submit) || ($preview) || ($refresh))
$err_msg .= ((!empty($err_msg)) ? '<br />' : '') . $result;
}
- if (($mode != 'edit') && (!$preview) && (!$refresh))
+ if (($mode != 'edit') && (!$preview) && (!$refresh) && (!$perm['f_ignoreflood']))
{
// Flood check
$where_sql = ($user->data['user_id'] == ANONYMOUS) ? "poster_ip = '$user->ip'" : 'poster_id = ' . $user->data['user_id'];
@@ -506,7 +506,7 @@ if (($submit) || ($preview) || ($refresh))
if ($row = $db->sql_fetchrow($result))
{
- if (intval($row['last_post_time']) && ($current_time - intval($row['last_post_time'])) < intval($config['flood_interval']) && !$perm['f_ignoreflood'])
+ if (intval($row['last_post_time']) && ($current_time - intval($row['last_post_time'])) < intval($config['flood_interval']))
{
$err_msg .= ((!empty($err_msg)) ? '<br />' : '') . $user->lang['FLOOD_ERROR'];
}