From 7b1a08d85cf28d46da459bb78b05a5bb8696fcce Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Sat, 7 Sep 2013 02:57:42 +1000 Subject: [PATCH] purge flood cache table after filter stuff, not before --- inc/filters.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/inc/filters.php b/inc/filters.php index 81a33116..212118bf 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -212,8 +212,6 @@ function do_filters(array $post) { } } - purge_flood_table(); - if (isset($has_flood)) { if ($post['has_file']) { $query = prepare("SELECT * FROM ``flood`` WHERE `ip` = :ip OR `posthash` = :posthash OR `filehash` = :filehash"); @@ -224,7 +222,6 @@ function do_filters(array $post) { $query = prepare("SELECT * FROM ``flood`` WHERE `ip` = :ip OR `posthash` = :posthash"); $query->bindValue(':ip', $_SERVER['REMOTE_ADDR']); $query->bindValue(':posthash', md5($post['body_nomarkup'])); - } $query->execute() or error(db_error($query)); $flood_check = $query->fetchAll(PDO::FETCH_ASSOC); @@ -238,5 +235,7 @@ function do_filters(array $post) { if ($filter->check($post)) $filter->action(); } + + purge_flood_table(); }