function lingotek_get_node_id_from_document_id in Lingotek Translation 7.2
Finds the Node ID when given a Document ID. (Deprecate) Returns FALSE if not found.
1 call to lingotek_get_node_id_from_document_id()
- lingotek_notifications in ./
lingotek.sync.inc - Registers the site translation notfication callback. This URL will be called when a document translation is complete, and can be downloaded.
File
- ./
lingotek.sync.inc, line 236 - Content translation management and sync functions.
Code
function lingotek_get_node_id_from_document_id($document_id) {
$found = FALSE;
$source_language = lingotek_get_source_language();
$key = 'document_id';
$query = db_select('lingotek', 'l')
->fields('l');
$query
->condition('lingokey', $key);
$query
->condition('lingovalue', $document_id);
$result = $query
->execute();
if ($record = $result
->fetchAssoc()) {
$found = $record['nid'];
}
return $found;
}