-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplugin_install.php
executable file
·98 lines (79 loc) · 2.72 KB
/
plugin_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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
/**
* Jomres CMS Agnostic Plugin
* @author Woollyinwales IT <sales@jomres.net>
* @version Jomres 9
* @package Jomres
* @copyright 2005-2020 Vince Wooll
* Jomres (tm) PHP files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project.
**/
// ################################################################
defined( '_JOMRES_INITCHECK' ) or die( '' );
// ################################################################
if (!defined('JOMRES_INSTALLER')) exit;
$query = "CREATE TABLE IF NOT EXISTS `#__jomres_channelmanagement_framework_channels` (
`id` int(10) NOT NULL auto_increment,
`cms_user_id` bigint(10),
`channel_name` varchar(255),
`channel_friendly_name` varchar(255),
`params` longtext,
PRIMARY KEY (id)
)";
doInsertSql($query,"");
$query = "CREATE TABLE IF NOT EXISTS `#__jomres_channelmanagement_framework_property_uid_xref` (
`id` int(10) NOT NULL auto_increment,
`channel_id` int(10),
`property_uid` int(10),
`remote_property_uid` int(10),
`cms_user_id` bigint(10),
`remote_data` longtext,
PRIMARY KEY (id)
)";
doInsertSql($query,"");
$query = "CREATE TABLE IF NOT EXISTS `#__jomres_channelmanagement_framework_mapping` (
`id` int(10) NOT NULL auto_increment,
`channel_name` varchar(255),
`type` varchar(255),
`params` longtext,
PRIMARY KEY (id)
)";
doInsertSql($query,"");
$query = "CREATE TABLE IF NOT EXISTS `#__jomres_channelmanagement_framework_plugins_user_accounts` (
`id` int(10) NOT NULL auto_increment,
`cms_user_id` bigint(10),
`params` longtext,
PRIMARY KEY (id)
)";
doInsertSql($query,"");
$query = "CREATE TABLE IF NOT EXISTS `#__jomres_channelmanagement_framework_rooms_xref` (
`id` int(10) NOT NULL auto_increment,
`channel_id` int(10),
`property_uid` int(10),
`params` longtext,
PRIMARY KEY (id)
)";
doInsertSql($query,"");
$query = "CREATE TABLE IF NOT EXISTS `#__jomres_channelmanagement_framework_bookings_xref` (
`id` int(10) NOT NULL auto_increment,
`property_uid` int(10),
`channel_id` int(10),
`remote_booking_id` varchar(255),
`local_booking_id` varchar(255),
PRIMARY KEY (id)
)";
doInsertSql($query,"");
$query = "CREATE TABLE IF NOT EXISTS `#__jomres_channelmanagement_framework_changelog_queue_items` (
`id` int(10) NOT NULL auto_increment,
`channel_name` varchar(255),
`property_uid` int(10),
`unique_id` varchar(255) UNIQUE,
`date_added` datetime default NULL ,
`completed` BOOL NOT NULL DEFAULT '0',
`attempts` int(3) default 0,
`item` longtext,
PRIMARY KEY (id)
)";
doInsertSql($query,"");
$jomres_cron = jomres_singleton_abstract::getInstance('jomres_cron');
$jomres_cron->addJob('get_remote_changelog_items', 'QH', '');
$jomres_cron->addJob('process_remote_changelog_items', 'QH', '');