function lingotek_node_init_default in Lingotek Translation 7.2
Same name and namespace in other branches
- 7.3 lingotek.util.inc \lingotek_node_init_default()
Run this on nodes you aren't sure if they've been initialized yet for use with Lingotek.
File
- ./
lingotek.util.inc, line 141 - Utility functions.
Code
function lingotek_node_init_default($node) {
if (lingotek_lingonode($node->nid, 'document_id') === FALSE) {
lingotek_trace("lingotek_node_init_default", array(
'nid' => $node->nid,
'language' => $node->language,
));
LingotekApi::instance()
->addContentDocument($node, TRUE);
lingotek_lingonode($node->nid, 'phase_template_id', variable_get('lingotek_phase_template', 2));
}
}