function lingotek_entity_changed in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lingotek.util.inc \lingotek_entity_changed()
- 7.5 lingotek.util.inc \lingotek_entity_changed()
2 calls to lingotek_entity_changed()
File
- ./
lingotek.util.inc, line 1906 - Utility functions.
Code
function lingotek_entity_changed($entity_type, $entity, $entity_id) {
$updated_entity = $entity;
if ($entity_type == 'node') {
$updated_entity = lingotek_node_load_default($entity_id);
}
$xml = lingotek_entity_xml_body($entity_type, $updated_entity);
$hash = md5($xml);
$oldhash = lingotek_keystore($entity_type, $entity_id, 'hash');
if (!$oldhash || strcmp($hash, $oldhash)) {
lingotek_keystore($entity_type, $entity_id, 'hash', $hash);
return TRUE;
}
return FALSE;
}