-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindus_profile.install
59 lines (47 loc) · 1.85 KB
/
indus_profile.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
<?php
/**
* @file indus_profile.install
* Main installation file for Reblochon profile
*/
/**
* Remove language prefix for French (after it has been set automatically by site-install)
*/
function indus_profile_install_tasks(&$install_state) {
if ($install_state['active_task'] == 'install_import_locales_remaining') {
// Set default timezone & disable configurable timezones
variable_set('date_default_timezone', 'America/New_York');
variable_set('configurable_timezones', 0);
variable_set('date_first_day', 1);
variable_set('site_default_country', 'CA');
}
}
/**
* Implements hook_install().
*/
function indus_profile_install() {
// Create a default role for site administrators, with all available permissions assigned.
$role = new stdClass();
$role->name = 'Administrateur';
$role->weight = 2;
user_role_save($role);
user_role_grant_permissions($role->rid, array_keys(module_invoke_all('permission')));
// Set this as the administrator role.
variable_set('user_admin_role', $role->rid);
// Assign user 1 the 'administrator' role.
db_insert('users_roles')->fields(array('uid' => 1, 'rid' => $role->rid))->execute();
// Allow only administrator to create users.
variable_set('user_register', USER_REGISTER_ADMINISTRATORS_ONLY);
// Enable default permissions for system roles.
user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content'));
user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access content'));
// Set appareance settings for administration
theme_enable(array('adminimal'));
variable_set('admin_theme', 'adminimal');
variable_set('node_admin_theme', 1);
// Path configuration
variable_set('pathauto_update_action', 1);
variable_set('pathauto_transliterate', 1);
variable_set('pathauto_reduce_ascii', 1);
// Image quality
variable_set('image_jpeg_quality', 90);
}