function lingotek_workbench_redirect in Lingotek Translation 7.5
Same name and namespace in other branches
- 7.4 lingotek.page.inc \lingotek_workbench_redirect()
- 7.6 lingotek.page.inc \lingotek_workbench_redirect()
1 string reference to 'lingotek_workbench_redirect'
- lingotek_menu in ./
lingotek.module - Implements hook_menu().
File
- ./
lingotek.page.inc, line 646 - Lingotek Tab for Nodes
Code
function lingotek_workbench_redirect($entity_type, $entity_id, $lingotek_locale) {
$drupal_language_code = Lingotek::convertLingotek2Drupal($lingotek_locale);
if (module_exists('entitycache')) {
cache_clear_all($entity_id, "cache_entity_{$entity_type}");
}
$entity = lingotek_entity_load_single($entity_type, $entity_id);
if ($entity->language == $drupal_language_code) {
drupal_goto($entity_type . '/' . $entity_id . '/edit');
}
else {
$translation_edit_link = lingotek_get_workbench_url($entity->lingotek['document_id'], $lingotek_locale);
drupal_goto($translation_edit_link);
}
}