You are here

function lingotek_node_update in Lingotek Translation 6

Same name and namespace in other branches
  1. 7.2 lingotek.module \lingotek_node_update()
  2. 7.3 lingotek.module \lingotek_node_update()
  3. 7.4 lingotek.module \lingotek_node_update()
2 calls to lingotek_node_update()
lingotek_nodeapi in ./lingotek.module
lingotek_update_6201 in ./lingotek.install

File

./lingotek.module, line 153

Code

function lingotek_node_update($node) {
  global $_lingotek_client;
  $doc_id = lingotek_lingonode($node->nid, 'document_id');
  if ($doc_id == FALSE) {
    return;
  }
  $xml = "<?xml version=\"1.0\"?><contents><title><![CDATA[" . $node->title . "]]></title><body><![CDATA[" . $node->body . "]]></body></contents>";
  $_lingotek_client
    ->request('updateContentDocument', array(
    'documentId' => $doc_id,
    'content' => $xml,
  ));
}