function globallink_update_change_detection in GlobalLink Connect for Drupal 7.5
Same name and namespace in other branches
- 7.7 globallink.module \globallink_update_change_detection()
- 7.6 globallink.module \globallink_update_change_detection()
Update row to flag that node has been modified.
Parameters
object $node: The node object.
string $lang: The locale of the node.
1 call to globallink_update_change_detection()
- globallink_node_presave in ./
globallink.module - Implements hook_node_presave().
File
- ./
globallink.module, line 1078 - GlobalLink translation module.
Code
function globallink_update_change_detection($node, $lang) {
module_load_include("inc", "globallink", "globallink");
$tpt_locale_code = globallink_get_locale_code($lang);
db_update('globallink_core')
->fields(array(
'last_modified' => REQUEST_TIME,
'changed' => 1,
))
->condition('nid', $node->nid, '=')
->condition('source', $tpt_locale_code, '=')
->execute();
}