Projet

Général

Profil

Paste
Télécharger (584 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / i18n / i18n_forum / i18n_forum.install @ 9faa5de0

1
<?php
2
/**
3
 * @file
4
 * Multilingual forum install file.
5
 */
6

    
7
/**
8
 * Implements hook_install().
9
 */
10
function i18n_forum_install() {
11
  // Set module weight for it to run after core modules and i18n_taxonomy.
12
  db_query("UPDATE {system} SET weight = 10 WHERE name = 'i18n_forum' AND type = 'module'");
13
  // Make forum vocabulary translatable.
14
  if (($vid = variable_get('forum_nav_vocabulary', 0)) && !i18n_taxonomy_vocabulary_mode($vid)) {
15
    $vocabulary = taxonomy_vocabulary_load($vid);
16
    $vocabulary->i18n_mode = I18N_MODE_LOCALIZE;
17
    taxonomy_vocabulary_save($vocabulary);
18
  }
19
}