mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
Fixed broken flood control (#666)
This commit is contained in:
parent
e99de931a7
commit
f62d25d33b
2 changed files with 3 additions and 4 deletions
|
@ -234,7 +234,7 @@ switch ($this->request['type']) {
|
|||
$sql = "SELECT MAX(p.post_time) AS last_post_time FROM " . BB_POSTS . " p WHERE $where_sql";
|
||||
if ($row = DB()->fetch_row($sql) and $row['last_post_time']) {
|
||||
if ($userdata['user_level'] == USER) {
|
||||
if (TIMENOW - $row['last_post_time'] < $bb_cfg['flood_interval']) {
|
||||
if ((TIMENOW - $row['last_post_time']) < $bb_cfg['flood_interval']) {
|
||||
$this->ajax_die($lang['FLOOD_ERROR']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,10 +105,9 @@ class Post
|
|||
|
||||
if ($mode == 'newtopic' || $mode == 'reply') {
|
||||
$sql = "SELECT MAX(p.post_time) AS last_post_time FROM " . BB_POSTS . " p WHERE $where_sql";
|
||||
|
||||
if ($row = DB()->fetch_row($sql) && $row['last_post_time']) {
|
||||
if ($row = DB()->fetch_row($sql) and $row['last_post_time']) {
|
||||
if ($userdata['user_level'] == USER) {
|
||||
if (TIMENOW - $row['last_post_time'] < $bb_cfg['flood_interval']) {
|
||||
if ((TIMENOW - $row['last_post_time']) < $bb_cfg['flood_interval']) {
|
||||
bb_die($lang['FLOOD_ERROR']);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue