You are here

function lingotek_workbench_moderation_bulk_select in Lingotek Translation 7.3

Same name and namespace in other branches
  1. 7.4 lingotek.sync.inc \lingotek_workbench_moderation_bulk_select()
1 call to lingotek_workbench_moderation_bulk_select()
lingotek_form_bulk_sync in ./lingotek.sync.inc

File

./lingotek.sync.inc, line 640
Sync and management

Code

function lingotek_workbench_moderation_bulk_select($form, $form_state, &$sync_report) {
  if (!isset($form_state['values']['upload_wb'])) {
    $wb_index = variable_get('lingotek_create_documents_by_default_workbench_moderation', 0);
  }
  else {
    $wb_index = $form_state['values']['upload_wb'];
  }
  $states = lingotek_get_workbench_moderation_states();
  $sync_report['workbench_moderation_states'] = $states;
  if ($sync_report['upload_nids_count'] > 0) {
    foreach ($states as $state) {
      $result = lingotek_get_workbench_moderation_state_select($state, $sync_report['upload_nids']);
      $sync_report['upload_nids_wb_count_' . $state] = count($result);

      // update nid count
      $sync_report['upload_nids_wb_' . $state] = $result;

      // update nid list
    }
  }

  /*
      if (module_exists('entity_translation') && $sync_report['upload_nids_et_count'] > 0) {
      $result = lingotek_get_workbench_moderation_state_select($state, $sync_report['upload_nids_et']);
      $sync_report['upload_nids_et_count'] = count($result);
      $sync_report['upload_nids_et'] = $result;
      } */
}