1
0
This repository has been archived on 2021-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
gallery3-contrib/modules/embed_videos/helpers/embed_videos_installer.php

27 lines
793 B
PHP
Raw Normal View History

2010-08-26 16:58:48 +00:00
<?php defined("SYSPATH") or die("No direct script access.");
class embed_videos_installer {
static function install() {
$db = Database::instance();
2010-08-26 16:58:48 +00:00
$db->query("CREATE TABLE {embedded_videos} (
`id` int(9) NOT NULL auto_increment,
`embed_code` varchar(2048) DEFAULT NULL,
`source` varchar(64) DEFAULT NULL,
`item_id` int(9) NOT NULL,
PRIMARY KEY (`id`),
KEY (`item_id`, `id`))
2010-08-26 16:58:48 +00:00
DEFAULT CHARSET=utf8;");
module::set_version("embed_videos", 2);
2010-08-26 16:58:48 +00:00
//exec("cd modules/gallery/controllers/; ln -s ../../embed/controllers/embeds.php embeds.php");
}
static function deactivate() {
}
static function uninstall() {
$db = Database::instance();
$db->query("DROP TABLE IF EXISTS {embedded_videos};");
module::delete("embed_videos");
}
2010-08-26 16:58:48 +00:00
}