summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-09-06 23:09:18 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-09-06 23:09:18 +1000
commitf309e4037c11197e4392e402992882358e4678c7 (patch)
treec0b7bbc65801ba693db55b847db3bddcbcc894a4 /install.php
parent14ff0fbeb3fd93e94a804d647971b8a9551c327f (diff)
Better and faster basic flood prevention, while merging it into $config['filters'].
Diffstat (limited to 'install.php')
-rw-r--r--install.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/install.php b/install.php
index e8bdda8b..0011a274 100644
--- a/install.php
+++ b/install.php
@@ -1,7 +1,7 @@
<?php
// Installation/upgrade file
-define('VERSION', 'v0.9.6-dev-18');
+define('VERSION', 'v0.9.6-dev-19');
require 'inc/functions.php';
@@ -392,6 +392,21 @@ if (file_exists($config['has_installed'])) {
query("ALTER TABLE ``ip_notes``
DROP INDEX `ip`,
ADD INDEX `ip_lookup` (`ip`, `time`)") or error(db_error());
+ case 'v0.9.6-dev-18':
+ query("CREATE TABLE IF NOT EXISTS ``flood`` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `ip` varchar(39) CHARACTER SET ascii NOT NULL,
+ `board` varchar(58) CHARACTER SET utf8 NOT NULL,
+ `time` int(11) NOT NULL,
+ `posthash` char(32) NOT NULL,
+ `filehash` char(32) DEFAULT NULL,
+ `isreply` tinyint(1) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `ip` (`ip`),
+ KEY `posthash` (`posthash`),
+ KEY `filehash` (`filehash`),
+ KEY `time` (`time`)
+ ) ENGINE=MyISAM DEFAULT CHARSET=ascii COLLATE=ascii_bin AUTO_INCREMENT=1 ;") or error(db_error());
case false:
// Update version number
file_write($config['has_installed'], VERSION);