function lingotek_notify_url_generate in Lingotek Translation 7.4
Same name and namespace in other branches
- 7.7 lingotek.sync.inc \lingotek_notify_url_generate()
- 7.3 lingotek.sync.inc \lingotek_notify_url_generate()
- 7.5 lingotek.sync.inc \lingotek_notify_url_generate()
- 7.6 lingotek.sync.inc \lingotek_notify_url_generate()
Generate and return the site callback url. This URL will be called when a document translation is complete, and can be downloaded. Format: ?doc_id={document_id}&target_code={target_language}&project_id={project_id}&completed={completed}
4 calls to lingotek_notify_url_generate()
- LingotekSync::updateNotifyUrl in lib/
Drupal/ lingotek/ LingotekSync.php - lingotek_notify_url_check in ./
lingotek.sync.inc - Notify URL Check - call lingotek_notify_url_update when lingotek_notify_url no longer matches lingotek_notify_url_generate
- lingotek_project_vault_select_form_submit in ./
lingotek.setup.inc - Project Select Screen - Form Submit
- lingotek_setup_new_account_form_submit in ./
lingotek.setup.inc - New Account - Form Processor Provisions a Lingotek account and sends activation notice.
File
- ./
lingotek.sync.inc, line 14 - Sync and management
Code
function lingotek_notify_url_generate($security_token = NULL) {
global $base_url;
if (is_null($security_token)) {
$security_token = variable_get('lingotek_notify_security_token', NULL);
if (is_null($security_token)) {
$security_token = md5(time());
variable_set('lingotek_notify_security_token', $security_token);
}
}
return $base_url . '/?q=' . LINGOTEK_NOTIFY_URL . '&doc_id={document_uuid}&doc_idx={document_id}&target_code={target_language}&completed={completed}&project_id={project_id}&security_token=' . $security_token;
}