static function install() { $db = Database::instance(); $db->query("CREATE TABLE {videos_files} (\n `id` int(9) NOT NULL auto_increment,\n `file` varchar(255) NOT NULL,\n `item_id` int(9),\n `parent_id` int(9),\n `task_id` int(9) NOT NULL,\n PRIMARY KEY (`id`))\n DEFAULT CHARSET=utf8;"); $db->query("CREATE TABLE {items_videos} (\n `id` int(9) NOT NULL auto_increment,\n `item_id` int(9) NOT NULL,\n PRIMARY KEY (`id`),\n KEY (`item_id`, `id`))\n DEFAULT CHARSET=utf8;"); module::set_var("videos", "allowed_extensions", serialize(array("avi", "mpg", "mpeg", "mov", "wmv", "asf", "mts"))); module::set_version("videos", 1); videos::check_config(); }
static function install() { $db = Database::instance(); $db->query("CREATE TABLE {videos_entries} (\n `id` int(9) NOT NULL auto_increment,\n `checked` boolean default 0,\n `is_directory` boolean default 0,\n `item_id` int(9),\n `parent_id` int(9),\n `path` varchar(255) NOT NULL,\n `task_id` int(9) NOT NULL,\n PRIMARY KEY (`id`))\n DEFAULT CHARSET=utf8;"); // rWatcher Edit: My Table. $db->query("CREATE TABLE {items_videos} (\n `id` int(9) NOT NULL auto_increment,\n `item_id` int(9) NOT NULL,\n PRIMARY KEY (`id`),\n KEY (`item_id`, `id`))\n 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(); }
public function remove_path() { access::verify_csrf(); $path = Input::instance()->get("path"); $paths = unserialize(module::get_var("videos", "authorized_paths")); if (isset($paths[$path])) { unset($paths[$path]); message::success(t("Removed path %path", array("path" => $path))); module::set_var("videos", "authorized_paths", serialize($paths)); videos::check_config($paths); } url::redirect("admin/videos"); }