diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2012-04-12 21:56:01 +1000 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2012-04-12 21:56:01 +1000 |
| commit | a564a95ab40eb1c9cc7de142db60aedb3e749176 (patch) | |
| tree | b94f1e2bdb8996ca31b75f6270930636d3f3fa39 /mod.php | |
| parent | dd0f421015059247464efd5f6d2735c5ee08a400 (diff) | |
Improved Tinyboard anti-bot/spam filter. See large comment in inc/config.php for details.
Diffstat (limited to 'mod.php')
| -rw-r--r-- | mod.php | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -9,7 +9,7 @@ require 'inc/mod.php'; if (get_magic_quotes_gpc()) { function strip_array($var) { - return is_array($var) ? array_map("strip_array", $var) : stripslashes($var); + return is_array($var) ? array_map('strip_array', $var) : stripslashes($var); } $_GET = strip_array($_GET); @@ -1698,6 +1698,10 @@ if(!$mod) { $query->bindValue(':board', $board['uri']); $query->execute() or error(db_error($query)); + $query = prepare("DELETE FROM `antispam` WHERE `board` = :board"); + $query->bindValue(':board', $board['uri']); + $query->execute() or error(db_error($query)); + $_board = $board; rebuildThemes('boards'); @@ -2209,7 +2213,6 @@ if(!$mod) { $page['pages'][$page_no-1]['selected'] = true; $page['btn'] = getPageButtons($page['pages'], true); $page['mod'] = true; - echo Element('index.html', $page); } elseif(preg_match('/^\/' . $regex['board'] . $regex['res'] . $regex['page'] . '$/', $query, $matches)) { // View thread @@ -2354,7 +2357,8 @@ if(!$mod) { if(!openBoard($boardName)) error($config['error']['noboard']); - if(!hasPermission($config['mod']['delete'], $boardName)) error($config['error']['noaccess']); + if(!hasPermission($config['mod']['delete'], $boardName)) + error($config['error']['noaccess']); $post = &$matches[2]; |
