-
Notifications
You must be signed in to change notification settings - Fork 21
/
oa_core.install
236 lines (207 loc) · 4.99 KB
/
oa_core.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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<?php
/**
* @file
* Provides update and install hooks to oa_core.
*/
/**
* Implements hook_install().
*/
function oa_core_install() {
oa_core_create_default_terms();
}
/**
* Create the default Space and Section taxonomy terms
*/
function oa_core_create_default_terms() {
$params = array(
'description' => 'This is the default space layout with the Recent Activity stream in the main region.',
'node_options' => array(),
'layout' => 'node:oa_space:default',
);
oa_core_create_term('space_type', 'Default', $params);
$params = array(
'description' => 'This is the default section layout with the Recent Activity stream in the main region.',
'node_options' => array(),
'layout' => 'node:oa_section:default',
);
oa_core_create_term('section_type', 'Default', $params);
}
/**
* Enable oa_search.
*/
function oa_core_update_7001() {
module_enable(array('oa_search'));
}
/**
* Ensure entity_token is enabled for oa_river.
*/
function oa_core_update_7002() {
module_enable(array('entity_token'));
}
/**
* Enable colorizer.
*/
function oa_core_update_7003() {
module_enable(array('colorizer'));
}
/**
* Enable message_digest and bootstrap_tour.
*/
function oa_core_update_7203() {
module_enable(array('message_digest', 'bootstrap_tour'));
}
/**
* Enable OA Appearance
*/
function oa_core_update_7204() {
module_enable(array('oa_appearance'));
}
/**
* Enable oa_tour.
*/
function oa_core_update_7205() {
module_enable(array('oa_tour'));
}
/**
* Enable oa_messages_digest.
*/
function oa_core_update_7206() {
module_enable(array('oa_messages_digest'));
}
/**
* Enable oa_sandbox
*/
function oa_core_update_7207() {
module_enable(array('oa_sandbox'));
}
/**
* Enable oa_responsive_regions
*/
function oa_core_update_7208() {
module_enable(array('oa_responsive_regions'));
}
/**
* Enable oa_tour_defaults.
*/
function oa_core_update_7209() {
module_enable(array('oa_tour_defaults'));
}
/**
* Enable oa_update.
*/
function oa_core_update_7210() {
module_enable(array('oa_update'));
}
/**
* Enable oa_htmlmail.
*/
function oa_core_update_7211() {
module_enable(array('htmlmail', 'oa_htmlmail'));
}
/**
* Enable oa_adminrole.
*/
function oa_core_update_7213() {
module_enable(array('oa_adminrole'));
}
/**
* Enable trash_flag, oa_archive.
*/
function oa_core_update_7214() {
module_enable(array('trash_flag', 'oa_archive'));
}
/**
* Enable clone, oa_clone.
*/
function oa_core_update_7215() {
module_enable(array('clone', 'oa_clone'));
}
/**
* Enable advagg.
*/
function oa_core_update_7216() {
module_enable(array('advagg'));
}
/**
* Enable conditional_styles.
*/
function oa_core_update_7217() {
module_enable(array('conditional_styles'));
}
/**
* Create wide breakpoint for navbar if one does not exist.
*
* Without this breakpoint, the navbar breaks in IE10+
*/
function oa_core_update_7218() {
if (module_exists('breakpoints')) {
if (!$breakpoint = breakpoints_breakpoint_load('wide', 'navbar', 'module')) {
// Add a breakpoint for switching between horizontal and vertical tray
// orientation.
$breakpoint = new stdClass();
$breakpoint->disabled = FALSE;
$breakpoint->api_version = 1;
$breakpoint->name = 'wide';
$breakpoint->breakpoint = 'only screen and (min-width: 50em)';
$breakpoint->source = 'navbar';
$breakpoint->source_type = 'module';
$breakpoint->status = 1;
$breakpoint->weight = 0;
$breakpoint->multipliers = array();
breakpoints_breakpoint_save($breakpoint);
}
}
}
/**
* Call media update 7226 missed because of past media patches
*/
function oa_core_update_7219() {
// patch used in OA 2.19: http://drupal.org/files/issues/media_remove_file_display_alter-2104193-23.patch
// added a media_update_7226 hook which prevents update.php from seeing the
// REAL media_update_7226 hook.
module_load_install('media');
media_update_7226();
}
/**
* Enable oa_toolbar, radix_layouts, bootstrap_library
*/
function oa_core_update_7220() {
module_enable(array('oa_toolbar', 'radix_layouts', 'bootstrap_library'));
}
/**
* Enable ultimate_cron
*/
function oa_core_update_7221() {
module_enable(array('ultimate_cron'));
}
/**
* Rebuild registry to handle modules that have moved
*/
function oa_core_update_7222() {
// rebuild the registry for other module moves
cache_clear_all('ctools_plugin_type_info', 'cache');
cache_clear_all('lookup_cache', 'cache_bootstrap');
cache_clear_all('variables', 'cache_bootstrap');
cache_clear_all('module_implements', 'cache_bootstrap');
drupal_static_reset('ctools_plugin_type_info_loaded');
drupal_static_reset('ctools_plugin_type_info');
registry_rebuild();
}
/**
* Enable sitemap and wizard apps
*/
function oa_core_update_7223() {
module_enable(array('oa_sitemap', 'oa_wizard'));
}
/**
* Enable paragraphs module
*/
function oa_core_update_7224() {
module_enable(array('paragraphs'));
}
/**
* Enable oa_angular module
*/
function oa_core_update_7225() {
module_enable(array('oa_angular'));
}