function lingotek_fix_failed_language_specific_targets in Lingotek Translation 7.7
Fixes language-specific targets that have previously failed
1 call to lingotek_fix_failed_language_specific_targets()
- lingotek_cron in ./
lingotek.module  - Implements hook_cron().
 
File
- ./
lingotek.util.inc, line 3399  - Utility functions.
 
Code
function lingotek_fix_failed_language_specific_targets() {
  $failed_entities = variable_get('lingotek_failed_language_specific_targets', FALSE) ? variable_get('lingotek_failed_language_specific_targets', FALSE) : array();
  foreach ($failed_entities as $entity_type => $entity_ids) {
    $form_state = array();
    $form_state['values']['op'] = 'Fix language-specific targets';
    $form_state['values']['submit'] = 'Fix language-specific targets submit';
    $form_state['values']['entity_type'] = $entity_type;
    $form_state['values']['entity_ids'] = $entity_ids;
    drupal_form_submit('fix_failed_language_specific_form', $form_state);
  }
}