diff --git a/inc/instance-functions.php b/inc/instance-functions.php index d3fdf24b..a2102f94 100644 --- a/inc/instance-functions.php +++ b/inc/instance-functions.php @@ -7,7 +7,7 @@ function max_posts_per_hour($post) { if (!$config['hour_max_threads']) return false; if ($post['op']) { - $query = prepare(sprintf('SELECT COUNT(*) AS `count` FROM ``posts_%s`` WHERE `thread` IS NULL AND FROM_UNIXTIME(`time`) > DATE_SUB(NOW(), INTERVAL 1 HOUR);', $board[$ + $query = prepare(sprintf('SELECT COUNT(*) AS `count` FROM ``posts_%s`` WHERE `thread` IS NULL AND FROM_UNIXTIME(`time`) > DATE_SUB(NOW(), INTERVAL 1 HOUR);', $board['uri'])); $query->bindValue(':ip', $_SERVER['REMOTE_ADDR']); $query->execute() or error(db_error($query)); $r = $query->fetch(PDO::FETCH_ASSOC);