-
Notifications
You must be signed in to change notification settings - Fork 0
/
timeline_install.php
50 lines (46 loc) · 1.35 KB
/
timeline_install.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/**
* Performs install/uninstall methods for the thumbmaps plugin
*
* PHP version 5
* LICENSE: This source file is subject to LGPL license
* that is available through the world-wide-web at the following URI:
* http://www.gnu.org/copyleft/lesser.html
* @author Ushahidi Team <team@ushahidi.com>
* @package Ushahidi - http://source.ushahididev.com
* @module thumbmaps Installer
* @copyright Ushahidi - http://www.ushahidi.com
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License (LGPL)
*/
class timeline_Install {
/**
* Constructor to load the shared database library
*/
public function __construct()
{
die("hello");
$this->db = Database::instance();
}
/**
* Creates the required database tables for the timeline plugin
*/
public function run_install()
{
// Create the database tables.
// Also include table_prefix in name
$this->db->query("
CREATE TABLE IF NOT EXISTS `".Kohana::config('database.default.table_prefix')."timeline_settings` (
id int(11) unsigned NOT NULL AUTO_INCREMENT,
timeline_interval varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
);
");
}
/**
* Deletes the database tables for the actionable module
*/
public function uninstall()
{
$this->db->query('DROP TABLE `'.Kohana::config('database.default.table_prefix').'timeline_settings`');
}
}