removed i18n_taxonomy module from features dependencies
fixed some bugs
This commit is contained in:
@@ -171,6 +171,9 @@ function materio_search_api_search_api_solr_dynamic_field_info() {
|
||||
function materio_search_api_entity_property_info_alter(&$info){
|
||||
// dsm($info, 'hook_entity_property_info_alter | info');
|
||||
// watchdog('materio solr', 'materio_search_api_entity_property_info_alter', array());
|
||||
|
||||
// NODE PROPERTIES
|
||||
|
||||
$node_props = &$info['node']['properties'];
|
||||
|
||||
for ($i=1; $i <= 5 ; $i++) {
|
||||
@@ -214,6 +217,7 @@ function materio_search_api_entity_property_info_alter(&$info){
|
||||
);
|
||||
|
||||
|
||||
// TAXONOMIE TERMS PROPERTIES
|
||||
|
||||
$term_props = &$info['taxonomy_term']['properties'];
|
||||
|
||||
@@ -223,6 +227,12 @@ function materio_search_api_entity_property_info_alter(&$info){
|
||||
'type' => 'text',
|
||||
'getter callback' => 'materio_search_api_term_property_dup_name',
|
||||
);
|
||||
// $term_props['materio_search_api_term_property_name_translated'] = array(
|
||||
// 'label' => t("Term name translated"),
|
||||
// 'description' => t(""),
|
||||
// 'type' => 'text',
|
||||
// 'getter callback' => 'materio_search_api_term_property_name_translated',
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -421,10 +431,28 @@ function rip_tags($string) {
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Taxonomy terms properties
|
||||
*/
|
||||
function materio_search_api_term_property_dup_name($term){
|
||||
$lang = $term->language;
|
||||
|
||||
return $term->name_field[$lang][0]['value'];
|
||||
}
|
||||
// function materio_search_api_term_property_name_translated($term){
|
||||
// if($term->vid == 4){
|
||||
// print_r(get_defined_vars());
|
||||
//
|
||||
// // print_r($term);
|
||||
//
|
||||
// $trans = module_exists('i18n_taxonomy')
|
||||
// ? i18n_taxonomy_term_name($term, 'fr')
|
||||
// : $term->name;
|
||||
//
|
||||
// print_r($trans);
|
||||
// print "\n";
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* - - -- - - - - - - blocks - - - - - - - - - - -
|
||||
|
Reference in New Issue
Block a user