function globallink_get_row_by_nid_and_locale in GlobalLink Connect for Drupal 7.6
Same name and namespace in other branches
- 7.5 globallink.inc \globallink_get_row_by_nid_and_locale()
Gets GlobalLink row by node id and locale.
Parameters
int $nid: The node id.
string $source: The locale.
string $target: The target.
Return value
object The row.
2 calls to globallink_get_row_by_nid_and_locale()
- globallink_update_node_ticket_id in ./
globallink_node.inc - Updates the ticket id for a specified node.
- globallink_update_status in ./
globallink_node.inc - Updates the translation status.
File
- ./
globallink.inc, line 356 - Miscellaneous GlobalLink functions for node translations (non-entity).
Code
function globallink_get_row_by_nid_and_locale($nid, $source, $target) {
$result = db_select('globallink_core', 'tc')
->fields('tc')
->condition('nid', $nid, '=')
->condition('source', $source, '=')
->condition('target', $target, '=')
->execute();
foreach ($result as $row) {
return $row;
}
return FALSE;
}