-
Notifications
You must be signed in to change notification settings - Fork 0
/
insightly_webform.install
executable file
·57 lines (54 loc) · 1.44 KB
/
insightly_webform.install
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
<?php
/**
* @file
* Install, update and uninstall functions for the insightly_webform module.
*/
/**
* Implementation of hook_schema().
*/
function insightly_webform_schema() {
$schema['insightly_webform'] = array(
'description' => 'Salesforce Webform Settings Table',
'fields' => array(
'vid' => array(
'description' => 'TODO',
'type' => 'int',
'unsigned' => 1,
'not null' => TRUE,
),
'active' => array(
'description' => 'TODO',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'lead_source' => array(
'description' => 'Salesforce LEAD Source.',
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
),
),
'primary key' => array('vid'),
);
return $schema;
}
/**
* Implementation of hook_install().
*/
function insightly_webform_install() {
variable_set('insightly_webform_mapping_settings', array());
variable_set('insightly_webform_oid', '');
variable_set('insightly_webform_url', 'https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8');
variable_set('insightly_webform_debug', '');
}
/**
* Remove tables on uninstall.
*/
function insightly_webform_uninstall() {
variable_del('insightly_webform_oid');
variable_del('insightly_webform_url');
variable_del('insightly_webform_mapping_settings');
variable_del('insightly_webform_debug');
}