summaryrefslogtreecommitdiff
path: root/inc/anti-bot.php
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-08-01 00:47:33 -0400
committerczaks <marcin@6irc.net>2013-08-01 00:47:33 -0400
commit168a4d73cc2c47cd9039ff466b03fb6812fbb677 (patch)
tree418a3d3ba99739fcb4765f914de44b6ecc3f104a /inc/anti-bot.php
parentcefd5517ac1a532214ac2f47485f63958c87ce25 (diff)
parent5bf0e7f7e76cd3610e0aa692e0c433aca594ee51 (diff)
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Diffstat (limited to 'inc/anti-bot.php')
-rw-r--r--inc/anti-bot.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/inc/anti-bot.php b/inc/anti-bot.php
index bf29b3cb..fde97096 100644
--- a/inc/anti-bot.php
+++ b/inc/anti-bot.php
@@ -182,12 +182,12 @@ function _create_antibot($board, $thread) {
$antibot = new AntiBot(array($board, $thread));
- query('DELETE FROM `antispam` WHERE `expires` < UNIX_TIMESTAMP()') or error(db_error());
+ query('DELETE FROM ``antispam`` WHERE `expires` < UNIX_TIMESTAMP()') or error(db_error());
if ($thread)
- $query = prepare('UPDATE `antispam` SET `expires` = UNIX_TIMESTAMP() + :expires WHERE `board` = :board AND `thread` = :thread AND `expires` IS NULL');
+ $query = prepare('UPDATE ``antispam`` SET `expires` = UNIX_TIMESTAMP() + :expires WHERE `board` = :board AND `thread` = :thread AND `expires` IS NULL');
else
- $query = prepare('UPDATE `antispam` SET `expires` = UNIX_TIMESTAMP() + :expires WHERE `board` = :board AND `thread` IS NULL AND `expires` IS NULL');
+ $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)
@@ -195,7 +195,7 @@ function _create_antibot($board, $thread) {
$query->bindValue(':expires', $config['spam']['hidden_inputs_expire']);
$query->execute() or error(db_error($query));
- $query = prepare('INSERT INTO `antispam` VALUES (:board, :thread, :hash, UNIX_TIMESTAMP(), NULL, 0)');
+ $query = prepare('INSERT INTO ``antispam`` VALUES (:board, :thread, :hash, UNIX_TIMESTAMP(), NULL, 0)');
$query->bindValue(':board', $board);
$query->bindValue(':thread', $thread);
$query->bindValue(':hash', $antibot->hash());
@@ -248,7 +248,7 @@ function checkSpam(array $extra_salt = array()) {
if ($hash != $_hash)
return true;
- $query = prepare('SELECT `passed` FROM `antispam` WHERE `hash` = :hash');
+ $query = prepare('SELECT `passed` FROM ``antispam`` WHERE `hash` = :hash');
$query->bindValue(':hash', $hash);
$query->execute() or error(db_error($query));
if ((($passed = $query->fetchColumn(0)) === false) || ($passed > $config['spam']['hidden_inputs_max_pass'])) {
@@ -260,7 +260,7 @@ function checkSpam(array $extra_salt = array()) {
}
function incrementSpamHash($hash) {
- $query = prepare('UPDATE `antispam` SET `passed` = `passed` + 1 WHERE `hash` = :hash');
+ $query = prepare('UPDATE ``antispam`` SET `passed` = `passed` + 1 WHERE `hash` = :hash');
$query->bindValue(':hash', $hash);
$query->execute() or error(db_error($query));
}