removed i18n_taxonomy module from features dependencies
fixed some bugs
This commit is contained in:
@@ -39,6 +39,8 @@ function materio_taxonomy_menu_alter(&$items) {
|
||||
* qui filtre les terms par language mm pour les vocabulaires en mode localized.
|
||||
* utile pour la recherche avancée de materio_search_api materio_search_api_advanced_search_form()
|
||||
*
|
||||
*
|
||||
* Inutile si i18n_taxonomy module is desactivate
|
||||
*/
|
||||
function materio_taxonomy_query_term_access_alter(QueryAlterableInterface $query) {
|
||||
// dsm($query, 'materio taxo query');
|
||||
@@ -51,7 +53,7 @@ function materio_taxonomy_query_term_access_alter(QueryAlterableInterface $query
|
||||
// dsm($condition, 'conditon '.$condition['field']);
|
||||
if($condition['field'] == 't.vid'){
|
||||
$vid = $condition['value'];
|
||||
$i18n_voc_mode = i18n_taxonomy_vocabulary_mode($vid);
|
||||
$i18n_voc_mode = module_exists('i18n_taxonomy') ? i18n_taxonomy_vocabulary_mode($vid) : 0;
|
||||
// dsm($i18n_voc_mode, 'i18n_voc_mode');
|
||||
}
|
||||
}
|
||||
@@ -166,8 +168,10 @@ function materio_taxonomy_fr2en_batch($name, $t, &$context){
|
||||
$oldname = $t->name;
|
||||
$t->name = $name;
|
||||
taxonomy_term_save($t);
|
||||
$cont= array('term',$t->tid,'name');
|
||||
i18n_string_textgroup('taxonomy')->update_translation($cont, 'fr', $oldname);
|
||||
// $cont= array('term',$t->tid,'name');
|
||||
// i18n_string_textgroup('taxonomy')->update_translation($cont, 'fr', $oldname);
|
||||
|
||||
// https://www.drupal.org/project/entity_translation_export_import
|
||||
|
||||
$context['message'][] = $oldname .' -> '. $name;
|
||||
$_SESSION['http_request_count']++;
|
||||
|
Reference in New Issue
Block a user