Révision b3ab3446
Ajouté par Assos Assos il y a plus de 7 ans
drupal7/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.module | ||
---|---|---|
1096 | 1096 |
$query->join('taxonomy_term_hierarchy', 'h', 'h.tid = t.tid'); |
1097 | 1097 |
$result = $query |
1098 | 1098 |
->addTag('translatable') |
1099 |
->addTag('term_access') |
|
1099 |
->addTag('taxonomy_term_access')
|
|
1100 | 1100 |
->fields('t') |
1101 | 1101 |
->fields('h', array('parent')) |
1102 | 1102 |
->condition('t.vid', $vid) |
... | ... | |
1270 | 1270 |
} |
1271 | 1271 |
} |
1272 | 1272 |
} |
1273 |
|
|
1274 |
/** |
|
1275 |
* Implements hook_views_pre_render(). |
|
1276 |
*/ |
|
1277 |
function i18n_taxonomy_views_pre_render(&$view) { |
|
1278 |
if(!module_exists('rules_scheduler')) { |
|
1279 |
global $language; |
|
1280 |
|
|
1281 |
foreach ($view->result as $delta => $term){ |
|
1282 |
if (isset($term->tid)) { |
|
1283 |
i18n_string_translate_langcode($language->language); |
|
1284 |
$localized_term = i18n_taxonomy_localize_terms(taxonomy_term_load($term->tid)); |
|
1285 |
$term->tid = $localized_term->tid; |
|
1286 |
$term->taxonomy_term_data_name = $localized_term->name; |
|
1287 |
$term->taxonomy_term_data_description = $localized_term->description; |
|
1288 |
} |
|
1289 |
} |
|
1290 |
} |
|
1291 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules