diff options
author | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-04-10 19:11:09 +0000 |
---|---|---|
committer | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-04-10 19:11:09 +0000 |
commit | f2d09291474030c949a19e823d83fb62c09a0b54 (patch) | |
tree | 3d5cf2c579b19c6e5efc048a21422255054a31ee /phpBB/posting.php | |
parent | 73b191a343a67356b788f84185df89d76aef2ce7 (diff) | |
download | forums-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.php | 4 |
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']; } |