diff options
| author | Savetheinternet <savetheinternet@tinyboard.org> | 2011-09-18 03:17:54 +1000 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@tinyboard.org> | 2011-09-18 03:17:54 +1000 |
| commit | 4cbf5b91bf5f1d3d6252533808354dfd1706e38b (patch) | |
| tree | e7a18ada99a8414283bbd317f8bdc0fbd2b81772 | |
| parent | 3d5c2ac5f57dd7220cc3a09c870756db22bd90cf (diff) | |
fixed custom filters
| -rw-r--r-- | post.php | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -342,7 +342,7 @@ if(!isset($filter['message'])) $filter['message'] = 'Posting throttled by flood filter.'; - foreach($filter['condition'] as $condition=>$value) { + foreach($filter['condition'] as $condition => $value) { if($condition == 'posts_in_past_x_minutes' && isset($value[0]) && isset($value[1])) { // Check if there's been X posts in the past X minutes (on this board) @@ -403,15 +403,17 @@ $did_not_match = true; break; } - } - if(!isset($did_not_match)) { - // Matched filter! - if(isset($filter) && $filter['action'] == 'reject') { - error($filter['message']); + if(!isset($did_not_match)) { + // Matched filter! + if(isset($filter) && $filter['action'] == 'reject') { + error($filter['message']); + } } } } + exit; + if($post['has_file']) { if(!in_array($post['extension'], $config['allowed_ext']) && !in_array($post['extension'], $config['allowed_ext_files'])) error($config['error']['unknownext']); |
