function globallink_settings_taxonomy_process in GlobalLink Connect for Drupal 7.7
Taxonomy batch process start.
1 string reference to 'globallink_settings_taxonomy_process'
- prepare_taxonomy_button_submit in ./
globallink_settings.inc - Taxonomy batch set.
File
- ./
globallink_settings.inc, line 1290
Code
function globallink_settings_taxonomy_process($progress, $limit, $resultTaxonomyVocabulary, $resultTaxonomyTermdata, $values, &$context) {
$source = language_default()->language;
foreach ($resultTaxonomyVocabulary as $key => $value) {
$update = db_query("UPDATE {taxonomy_vocabulary} SET language = :language, i18n_mode =:i18n_mode WHERE vid = :vid", array(
':vid' => $value->vid,
':language' => $values['language'],
':i18n_mode' => $values['i18n_mode'],
));
}
if ($values['i18n_mode'] == '4' || $values['i18n_mode'] == '5') {
foreach ($resultTaxonomyTermdata as $key => $value) {
$update = db_query("UPDATE {taxonomy_term_data} SET language = :language WHERE tid = :tid", array(
':tid' => $value->tid,
':language' => $source,
));
}
}
$progress = $progress + $limit;
$context['message'] = 'Now processing ' . $progress . ' - ' . $context['results'][0] . ' Updated';
}