static function install() { $db = Database::instance(); $db->query("CREATE TABLE {folder_sync_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 `md5` varchar(32) NOT NULL,\n `added` int NULL DEFAULT NULL,\n PRIMARY KEY (`id`))\n DEFAULT CHARSET=utf8;"); module::set_version("folder_sync", 3); folder_sync::check_config(); }
public function remove_path() { access::verify_csrf(); $path = Input::instance()->get("path"); $paths = unserialize(module::get_var("folder_sync", "authorized_paths")); if (isset($paths[$path])) { unset($paths[$path]); message::success(t("Removed path %path", array("path" => $path))); module::set_var("folder_sync", "authorized_paths", serialize($paths)); folder_sync::check_config($paths); } url::redirect("admin/folder_sync"); }