You are here

function lingotek_node_init_default in Lingotek Translation 7.3

Same name and namespace in other branches
  1. 7.2 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 139
Utility functions.

Code

function lingotek_node_init_default($node) {
  if (lingotek_lingonode($node->nid, 'document_id') === FALSE) {
    LingotekLog::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));
  }
}