You are here

function lingotek_mt_sync_set_status in Lingotek Translation 7.4

Same name and namespace in other branches
  1. 7.2 lingotek.batch.inc \lingotek_mt_sync_set_status()
  2. 7.3 lingotek.batch.inc \lingotek_mt_sync_set_status()

Sets and clears session sync flags.

1 call to lingotek_mt_sync_set_status()
lingotek_sync_batch_create in ./lingotek.batch.inc
Batch Create - Sync: Uploads new and changed documents for translation and Downloads translated documents.

File

./lingotek.batch.inc, line 548
Central location for batch create functions, before control is handed off to individual batch command files.

Code

function lingotek_mt_sync_set_status($status, &$context = NULL) {
  switch ($status) {
    case 'set':
      $_SESSION['lingotek_sync_in_progress'] = 'syncing';
      break;
    case 'clear':
      if (isset($_SESSION['lingotek_sync_in_progress'])) {
        unset($_SESSION['lingotek_sync_in_progress']);
      }
      break;
  }
}