From 59eb6d7ec280ab8105b6bf0579809da12e4a7f2d Mon Sep 17 00:00:00 2001 From: Daku Date: Sun, 29 Dec 2013 20:46:37 +0000 Subject: [PATCH] pool title should be unique --- ext/pools/main.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/pools/main.php b/ext/pools/main.php index b161e8bb..42bbe2c9 100644 --- a/ext/pools/main.php +++ b/ext/pools/main.php @@ -71,6 +71,11 @@ class Pools extends Extension { log_info("pools", "extension installed"); } + + if ($config->get_int("ext_pools_version") < 2){ + $database->Execute("ALTER TABLE `pools` ADD UNIQUE INDEX (`title`);"); + $config->set_int("ext_pools_version", 2); + } } // Add a block to the Board Config / Setup