Skip to content

Commit ce4a76a

Browse files
committed
Refinement on installation procedure and coding standard.
1 parent 8876c5a commit ce4a76a

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

profiles/mysite/mysite.install

+19-12
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,22 @@ function mysite_install() {
1616
user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content'));
1717
user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access content'));
1818

19-
// Configure language
19+
// Configure language.
2020
_mysite_configure_language();
2121

22-
// Configure themes
23-
// _mysite_configure_themes();
22+
// Configure themes.
23+
_mysite_configure_themes();
2424

25-
// Set private file system
25+
// Set private file system.
2626
variable_set('file_private_path', variable_get('file_public_path', 'sites/default/files') . '/private');
2727
}
2828

29+
/**
30+
* Setup language.
31+
*/
2932
function _mysite_configure_language() {
3033
// Add italian language.
31-
locale_add_language('it', 'Italian', 'Italiano', LANGUAGE_LTR, '', '', true, true);
32-
drupal_set_message(t('The language %language has been add and is now the default language.', array('%language' => 'italian')));
34+
locale_add_language('it', 'Italian', 'Italiano', LANGUAGE_LTR, '', '', TRUE, TRUE);
3335

3436
// Modification of weight for italian language.
3537
$result = db_update('languages')
@@ -38,18 +40,23 @@ function _mysite_configure_language() {
3840
))
3941
->condition('language', 'it', '=')
4042
->execute();
43+
44+
drupal_set_message(t('The language %language has been add and is now the default language.', array('%language' => 'Italian')));
4145
}
4246

47+
/**
48+
* Setup themes.
49+
*/
4350
function _mysite_configure_themes() {
44-
// Enable seven and set it as admin theme
51+
// Enable seven and set it as admin theme.
4552
theme_enable(array('seven'));
46-
variable_set('admin_theme', 'seven');
53+
variable_set('admin_theme', 'rubik');
4754
variable_set('node_admin_theme', 1);
4855

49-
// Enable gestore_attivita and set it as default theme
50-
theme_enable(array('gestore_attivita'));
51-
variable_set('theme_default', 'gestore_attivita');
56+
// Enable gestore_attivita and set it as default theme.
57+
theme_enable(array('mysite'));
58+
variable_set('theme_default', 'mysite');
5259

53-
// Disable all the other themes
60+
// Disable all the other themes.
5461
theme_disable(array('bartik', 'garland', 'stark', 'omega'));
5562
}

0 commit comments

Comments
 (0)