function kaltura_create_node_from_kshow in Kaltura 5
Same name and namespace in other branches
- 6.2 plugins/node_kaltura_mix/node_kaltura_mix.module \kaltura_create_node_from_kshow()
- 6 plugins/node_kaltura_mix/node_kaltura_mix.module \kaltura_create_node_from_kshow()
1 call to kaltura_create_node_from_kshow()
- node_kaltura_mix_form in plugins/
node_kaltura_mix/ node_kaltura_mix.module - Implementation of hook_form().
File
- plugins/
node_kaltura_mix/ node_kaltura_mix.module, line 349
Code
function kaltura_create_node_from_kshow($result) {
global $user;
$node->title = $result['kshow']['name'];
$node->body = $result['kshow']['description'];
// print_r($notification_data,TRUE).PHP_EOL.print_r($_REQUEST,TRUE);
$node->type = 'kaltura_mix';
$node->uid = $user->uid;
$node->status = 1;
$node->created = time();
$node->comment = FALSE;
$node->changed = time();
$node->promote = 0;
$node->sticky = 0;
kaltura_push_mix_extra_fields($node, $result);
$node->kstatus = $result['kshow']['status'];
$node->kaltura_tags = str_replace('a generated show\'', '', $result['kshow']['tags']);
$node->kaltura_entryId = $result['kshow']['id'];
//$node->admin_tags = $result['kshow']['admin_tags'];
// Admin tags are not returned in xml from kaltura, so we take them from $_REQUEST
$node->kaltura_admin_tags = $_REQUEST['admin_tags'];
$node->kaltura_entry_data = serialize(array(
$result,
));
node_save($node);
module_invoke('node_kaltura_mix', 'hook_insert', $node);
}