query("CREATE TABLE {videos_entries} ( `id` int(9) NOT NULL auto_increment, `checked` boolean default 0, `is_directory` boolean default 0, `item_id` int(9), `parent_id` int(9), `path` varchar(255) NOT NULL, `task_id` int(9) NOT NULL, PRIMARY KEY (`id`)) DEFAULT CHARSET=utf8;"); // rWatcher Edit: My Table. $db->query("CREATE TABLE {items_videos} ( `id` int(9) NOT NULL auto_increment, `item_id` int(9) NOT NULL, PRIMARY KEY (`id`), KEY (`item_id`, `id`)) DEFAULT CHARSET=utf8;"); // rWatcher Edit: My Variable. module::set_var("videos", "allowed_extensions", serialize(array("avi", "mpg", "mpeg", "mov", "wmv", "asf", "mts"))); module::set_version("videos", 4); videos::check_config(); } static function upgrade($version) { $db = Database::instance(); if ($version < 4) { $db->query("DROP TABLE {videos_files}"); $db->query("CREATE TABLE {videos_entries} ( `id` int(9) NOT NULL auto_increment, `checked` boolean default 0, `is_directory` boolean default 0, `item_id` int(9), `parent_id` int(9), `path` varchar(255) NOT NULL, `task_id` int(9) NOT NULL, PRIMARY KEY (`id`)) DEFAULT CHARSET=utf8;"); module::set_version("videos", $version = 4); } } static function deactivate() { site_status::clear("videos_configuration"); } }