function update_entry_node_taxonomy in Kaltura 5
Same name and namespace in other branches
- 6 plugins/node_kaltura_entry/node_kaltura_entry.module \update_entry_node_taxonomy()
1 call to update_entry_node_taxonomy()
- node_kaltura_entry_insert in plugins/
node_kaltura_entry/ node_kaltura_entry.module - Implementation of hook_insert().
File
- plugins/
node_kaltura_entry/ node_kaltura_entry.module, line 424
Code
function update_entry_node_taxonomy(&$node) {
$voc_id = variable_get('kaltura_entry_tags_voc', '');
$avoc_id = variable_get('kaltura_entry_admin_tags_voc', '');
$terms['tags'] = array();
if ($voc_id) {
$terms['tags'][$voc_id] = $node->kaltura_tags;
}
if ($avoc_id) {
if ($voc_id == $avoc_id) {
$terms['tags'][$avoc_id] .= ',' . $node->kaltura_admin_tags;
}
else {
$terms['tags'][$avoc_id] = $node->kaltura_admin_tags;
}
}
$node->taxonomy = $terms;
taxonomy_node_save($node->nid, $terms);
}