You are here

function node_kaltura_mix_update in Kaltura 6.2

Same name and namespace in other branches
  1. 5 plugins/node_kaltura_mix/node_kaltura_mix.module \node_kaltura_mix_update()
  2. 6 plugins/node_kaltura_mix/node_kaltura_mix.module \node_kaltura_mix_update()

Implementation of hook_update().

File

plugins/node_kaltura_mix/node_kaltura_mix.module, line 795

Code

function node_kaltura_mix_update($node) {

  // if this is a new node or we're adding a new revision,
  if ($node->revision) {
    node_example_insert($node);
  }
  else {
    if ($node->notification_update !== TRUE) {
      kaltura_update_mix_tags_from_taxonomy($node);
    }
    $sql = 'UPDATE {node_kaltura} SET kaltura_tags = \'%s\', kaltura_admin_tags = \'%s\' WHERE vid = %d';
    db_query($sql, $node->kaltura_tags, $node->kaltura_admin_tags, $node->vid);
    watchdog('upd mix', $node->kaltura_tags);
    if ($node->notification_update !== TRUE) {
      kaltura_update_mix_tags($node->kaltura_entryId, $node->title, $node->body, $node->kaltura_tags, $node->kaltura_admin_tags);
    }
    else {
      watchdog('mix update', 'updating taxonomy from tags ' . $node->kaltura_tags);
      kaltura_update_mix_node_taxonomy($node);
    }
  }
}