1
|
<?php
|
2
|
/**
|
3
|
* @file
|
4
|
* Install, update and uninstall functions for the minimal installation profile.
|
5
|
*/
|
6
|
|
7
|
/**
|
8
|
* Implements hook_install().
|
9
|
*
|
10
|
* Performs actions to set up the site for this profile.
|
11
|
*
|
12
|
* @see system_install()
|
13
|
*/
|
14
|
function minimal_install() {
|
15
|
// Enable some standard blocks.
|
16
|
$default_theme = variable_get('theme_default', 'bartik');
|
17
|
$values = array(
|
18
|
array(
|
19
|
'module' => 'system',
|
20
|
'delta' => 'main',
|
21
|
'theme' => $default_theme,
|
22
|
'status' => 1,
|
23
|
'weight' => 0,
|
24
|
'region' => 'content',
|
25
|
'pages' => '',
|
26
|
'cache' => -1,
|
27
|
),
|
28
|
array(
|
29
|
'module' => 'user',
|
30
|
'delta' => 'login',
|
31
|
'theme' => $default_theme,
|
32
|
'status' => 1,
|
33
|
'weight' => 0,
|
34
|
'region' => 'sidebar_first',
|
35
|
'pages' => '',
|
36
|
'cache' => -1,
|
37
|
),
|
38
|
array(
|
39
|
'module' => 'system',
|
40
|
'delta' => 'navigation',
|
41
|
'theme' => $default_theme,
|
42
|
'status' => 1,
|
43
|
'weight' => 0,
|
44
|
'region' => 'sidebar_first',
|
45
|
'pages' => '',
|
46
|
'cache' => -1,
|
47
|
),
|
48
|
array(
|
49
|
'module' => 'system',
|
50
|
'delta' => 'management',
|
51
|
'theme' => $default_theme,
|
52
|
'status' => 1,
|
53
|
'weight' => 1,
|
54
|
'region' => 'sidebar_first',
|
55
|
'pages' => '',
|
56
|
'cache' => -1,
|
57
|
),
|
58
|
array(
|
59
|
'module' => 'system',
|
60
|
'delta' => 'help',
|
61
|
'theme' => $default_theme,
|
62
|
'status' => 1,
|
63
|
'weight' => 0,
|
64
|
'region' => 'help',
|
65
|
'pages' => '',
|
66
|
'cache' => -1,
|
67
|
),
|
68
|
);
|
69
|
$query = db_insert('block')->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'pages', 'cache'));
|
70
|
foreach ($values as $record) {
|
71
|
$query->values($record);
|
72
|
}
|
73
|
$query->execute();
|
74
|
|
75
|
// Allow visitor account creation, but with administrative approval.
|
76
|
variable_set('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);
|
77
|
|
78
|
// Enable default permissions for system roles.
|
79
|
user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content'));
|
80
|
user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access content'));
|
81
|
}
|