-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy patherpal_platform.install
96 lines (88 loc) · 2.15 KB
/
erpal_platform.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
<?php
/**
* @file
* Install, update and uninstall functions for the erpal platform install profile.
*/
/**
* Implements hook_install().
*
* Performs actions to set up the site for this profile.
*
* @see system_install()
*/
function erpal_platform_install() {
// Set time limit to unlimited.
drupal_set_time_limit(0);
// Disable all themes.
db_update('system')
->fields(array('status' => 0))
->condition('type', 'theme')
->execute();
$themes = array(
'default_theme' => 'erpal_theme',
'admin_theme' => 'seven',
'maintenance_theme' => 'erpal_maintenance',
);
// Set $admin_theme as admin theme.
variable_set('admin_theme', $themes['admin_theme']);
// $default_theme as default.
variable_set('theme_default', $themes['default_theme']);
// Enable themes.
theme_enable($themes);
// Enable js aggregation.
// Enable css aggregation.
// Add text formats.
$filtered_html_format = array(
'format' => 'filtered_html',
'name' => 'Filtered HTML',
'weight' => 0,
'filters' => array(
// URL filter.
'filter_url' => array(
'weight' => 0,
'status' => 1,
),
// HTML filter.
'filter_html' => array(
'weight' => 1,
'status' => 1,
),
// Line break filter.
'filter_autop' => array(
'weight' => 2,
'status' => 1,
),
// HTML corrector filter.
'filter_htmlcorrector' => array(
'weight' => 10,
'status' => 1,
),
),
);
$filtered_html_format = (object) $filtered_html_format;
filter_format_save($filtered_html_format);
$full_html_format = array(
'format' => 'full_html',
'name' => 'Full HTML',
'weight' => 1,
'filters' => array(
// URL filter.
'filter_url' => array(
'weight' => 0,
'status' => 1,
),
// Line break filter.
'filter_autop' => array(
'weight' => 1,
'status' => 1,
),
// HTML corrector filter.
'filter_htmlcorrector' => array(
'weight' => 10,
'status' => 1,
),
),
);
$full_html_format = (object) $full_html_format;
filter_format_save($full_html_format);
}