-
Notifications
You must be signed in to change notification settings - Fork 9
/
i18n.install
43 lines (37 loc) · 1.02 KB
/
i18n.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
<?php
// $Id: i18n.install,v 1.15.2.9.2.3 2011/02/14 11:36:29 jareyero Exp $
/**
* @file
* Installation file for Internationalization (i18n) module.
*/
/**
* Implements hook_install()
*/
function i18n_install() {
// Set module weight for it to run after core modules
db_query("UPDATE {system} SET weight = 10 WHERE name = 'i18n' AND type = 'module'");
}
/**
* Implements hook_uninstall()
*/
function i18n_uninstall() {
variable_del('i18n_drupal6_update');
}
/**
* Add fields to schema if they don't exist
*/
function i18n_install_create_fields($table, $fields) {
$schema = drupal_get_schema($table, TRUE);
foreach ($fields as $field) {
if (!empty($schema['fields'][$field]) && !db_field_exists($table, $field)) {
db_add_field($table, $field, $schema['fields'][$field]);
}
}
}
/**
* Mark this as updated so all (renamed) modules know they need to update from D6 version when installing
*/
function i18n_update_7000() {
variable_set('i18n_drupal6_update', TRUE);
variable_del('i18n_selection_mode');
}