summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Reyero2011-04-16 16:29:11 (GMT)
committer Jose Reyero2011-04-16 16:29:11 (GMT)
commit2a508281170ff3d319ef010f75039a8cf505f019 (patch)
tree4bb4db31e1eb1c74841ccd96440d2f2f7a141c37
parentc69e308a8505ad27b19093a131b9d87ee80f6f53 (diff)
Issue #1123042, by roderik: Wrong arguments in i18n_taxonomy_translate_terms
-rw-r--r--i18n_taxonomy/i18n_taxonomy.module6
1 files changed, 3 insertions, 3 deletions
diff --git a/i18n_taxonomy/i18n_taxonomy.module b/i18n_taxonomy/i18n_taxonomy.module
index 09658e4..78f1bd6 100644
--- a/i18n_taxonomy/i18n_taxonomy.module
+++ b/i18n_taxonomy/i18n_taxonomy.module
@@ -803,8 +803,8 @@ function i18n_taxonomy_translate_terms($taxonomy, $langcode, $fullterms = TRUE)
$mode = i18n_taxonomy_vocabulary_mode($index);
// We translate just some vocabularies: translatable, fixed language
// Fixed language ones may have terms translated, though the UI doesn't support it
- if ($mode == I18N_MODE_LANGUAGE || $mode == I18N_MODE_TRANSLATE) {
- $translation[$index] = i18n_taxonomy_translate_terms($tdata, $langcode, $filter, $fullterms);
+ if ($mode & I18N_MODE_LANGUAGE || $mode & I18N_MODE_TRANSLATE) {
+ $translation[$index] = i18n_taxonomy_translate_terms($tdata, $langcode, $fullterms);
}
elseif ($fullterms) {
$translation[$index] = array_map('_i18n_taxonomy_filter_terms', $tdata);
@@ -856,7 +856,7 @@ function i18n_taxonomy_translate_terms($taxonomy, $langcode, $fullterms = TRUE)
function i18n_taxonomy_localize_terms($terms, $fields = array('name')) {
$terms = is_array($terms) ? $terms : array($terms);
foreach ($terms as $index => $term) {
- if (i18n_taxonomy_vocabulary_mode($term->vid) === I18N_MODE_LOCALIZE) {
+ if (i18n_taxonomy_vocabulary_mode($term->vid, I18N_MODE_LOCALIZE)) {
foreach ($fields as $property) {
$term->$property = i18n_string(array('taxonomy', 'term', $term->tid, $property), $term->$property);
}