forked from wet-boew/wet-boew-drupal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wetkit.install
69 lines (62 loc) · 1.6 KB
/
wetkit.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
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
* @file
* Installation code for Drupal WxT.
*/
/**
* Implements hook_install().
*
* Perform actions to set up the site for this profile.
*/
function wetkit_install() {
// Set password_policy module defaults.
$policy = array();
$policy = array(
'character_types' => 3,
'delay' => 0,
'digit_placement' => 2,
'history' => 24,
'length' => 8,
'letter' => 2,
'username' => 1,
);
$pid = db_insert('password_policy')
->fields(array(
'name' => 'WetKit Default',
'description' => 'The default password policy implementation included with the WetKit distribution.',
'policy' => serialize($policy),
'enabled' => 1,
'expiration' => '90',
'warning' => '7,14',
'created' => REQUEST_TIME,
))
->execute();
// Enable an authenticated role the above for the default password policy.
db_insert('password_policy_role')
->fields(array(
'pid' => $pid,
'rid' => 2,
))
->execute();
// Only notify on Security Issue(s).
variable_set('update_notification_threshold', array('security'));
// Set the Admin Theme.
db_update('system')
->fields(array('status' => 1))
->condition('type', 'theme')
->condition('name', 'wetkit_ember')
->execute();
variable_set('admin_theme', 'wetkit_ember');
// Set the Bootstrap Theme.
db_update('system')
->fields(array('status' => 1))
->condition('type', 'theme')
->condition('name', 'bootstrap')
->execute();
}
/**
* Workbench Moderation schema correction.
*/
function wetkit_update_7100() {
drupal_set_installed_schema_version('workbench_moderation', '7010');
}