diff --git a/inc/functions.php b/inc/functions.php index f1c2c26c..3530ab77 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -1615,21 +1615,23 @@ function checkMute() { function _create_antibot($board, $thread) { global $config, $purged_old_antispam; - $antibot = new AntiBot(array($board, $thread)); + $antibot = new AntiBot([$board, $thread]); if (!isset($purged_old_antispam)) { $purged_old_antispam = true; query('DELETE FROM ``antispam`` WHERE `expires` < UNIX_TIMESTAMP()') or error(db_error()); } - if ($thread) + if ($thread) { $query = prepare('UPDATE ``antispam`` SET `expires` = UNIX_TIMESTAMP() + :expires WHERE `board` = :board AND `thread` = :thread AND `expires` IS NULL'); - else + } else { $query = prepare('UPDATE ``antispam`` SET `expires` = UNIX_TIMESTAMP() + :expires WHERE `board` = :board AND `thread` IS NULL AND `expires` IS NULL'); + } $query->bindValue(':board', $board); - if ($thread) + if ($thread) { $query->bindValue(':thread', $thread); + } $query->bindValue(':expires', $config['spam']['hidden_inputs_expire']); $query->execute() or error(db_error($query));