mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-14 04:30:29 +01:00
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
This commit is contained in:
parent
73b191a343
commit
f2d0929147
@ -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'];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user