Issues #1214616 and #1156564: Taxonomy term translation issues and Remove term from...
[project/i18n.git] / i18n.install
1 <?php
2
3 /**
4 * @file
5 * Installation file for Internationalization (i18n) module.
6 */
7
8
9 /**
10 * Implements hook_install().
11 */
12 function i18n_install() {
13 // Set module weight for it to run after core modules
14 db_query("UPDATE {system} SET weight = 10 WHERE name = 'i18n' AND type = 'module'");
15 }
16
17 /**
18 * Implements hook_uninstall().
19 */
20 function i18n_uninstall() {
21 variable_del('i18n_drupal6_update');
22 }
23
24 /**
25 * Add fields to schema if they don't exist
26 */
27 function i18n_install_create_fields($table, $fields) {
28 $schema = drupal_get_schema($table, TRUE);
29 foreach ($fields as $field) {
30 if (!empty($schema['fields'][$field]) && !db_field_exists($table, $field)) {
31 db_add_field($table, $field, $schema['fields'][$field]);
32 }
33 }
34 }
35
36 /**
37 * Mark this as updated so all (renamed) modules know they need to update from D6 version when installing
38 */
39 function i18n_update_7000() {
40 variable_set('i18n_drupal6_update', TRUE);
41 variable_del('i18n_selection_mode');
42 }