summaryrefslogtreecommitdiff
path: root/modules/tag/helpers
diff options
context:
space:
mode:
authorRomain LE DISEZ <romain.git@ledisez.net>2009-06-24 23:02:57 +0200
committerRomain LE DISEZ <romain.git@ledisez.net>2009-06-24 23:02:57 +0200
commit6111272568a732465c330597a068a048f6705ef9 (patch)
treef8829dfb4c4ee566a69f91d397e74e74aec56dbd /modules/tag/helpers
parentde28b0350e5d5bf6c3e1eb5a9531298b08fd7cba (diff)
parentf56d372629df5b08a30d0182d4e1e7c97a44d79f (diff)
Merge commit 'upstream/master'
Conflicts: modules/comment/helpers/comment_installer.php modules/gallery/models/item.php
Diffstat (limited to 'modules/tag/helpers')
-rw-r--r--modules/tag/helpers/tag_installer.php35
1 files changed, 16 insertions, 19 deletions
diff --git a/modules/tag/helpers/tag_installer.php b/modules/tag/helpers/tag_installer.php
index 07544c54..3c16e3f3 100644
--- a/modules/tag/helpers/tag_installer.php
+++ b/modules/tag/helpers/tag_installer.php
@@ -20,26 +20,23 @@
class tag_installer {
static function install() {
$db = Database::instance();
- $version = module::get_version("tag");
- if ($version == 0) {
- $db->query("CREATE TABLE IF NOT EXISTS {tags} (
- `id` int(9) NOT NULL auto_increment,
- `name` varchar(64) NOT NULL,
- `count` int(10) unsigned NOT NULL DEFAULT 0,
- PRIMARY KEY (`id`),
- UNIQUE KEY(`name`))
- ENGINE=InnoDB DEFAULT CHARSET=utf8;");
+ $db->query("CREATE TABLE IF NOT EXISTS {tags} (
+ `id` int(9) NOT NULL auto_increment,
+ `name` varchar(64) NOT NULL,
+ `count` int(10) unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY(`name`))
+ ENGINE=InnoDB DEFAULT CHARSET=utf8;");
- $db->query("CREATE TABLE IF NOT EXISTS {items_tags} (
- `id` int(9) NOT NULL auto_increment,
- `item_id` int(9) NOT NULL,
- `tag_id` int(9) NOT NULL,
- PRIMARY KEY (`id`),
- KEY(`tag_id`, `id`),
- KEY(`item_id`, `id`))
- ENGINE=InnoDB DEFAULT CHARSET=utf8;");
- module::set_version("tag", 1);
- }
+ $db->query("CREATE TABLE IF NOT EXISTS {items_tags} (
+ `id` int(9) NOT NULL auto_increment,
+ `item_id` int(9) NOT NULL,
+ `tag_id` int(9) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY(`tag_id`, `id`),
+ KEY(`item_id`, `id`))
+ ENGINE=InnoDB DEFAULT CHARSET=utf8;");
+ module::set_version("tag", 1);
}
static function uninstall() {