function kaltura_create_node_from_roughcut in Kaltura 5
Same name and namespace in other branches
- 6.2 plugins/node_kaltura_mix/node_kaltura_mix.module \kaltura_create_node_from_roughcut()
- 6 plugins/node_kaltura_mix/node_kaltura_mix.module \kaltura_create_node_from_roughcut()
2 calls to kaltura_create_node_from_roughcut()
- kaltura_contribution_wizard in includes/
kaltura.themeing.inc - 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 378
Code
function kaltura_create_node_from_roughcut($result, $status = NULL) {
global $user;
$node->title = $result['entry']['name'];
$node->body = $result['entry']['description'];
// print_r($notification_data,TRUE).PHP_EOL.print_r($_REQUEST,TRUE);
$node->type = 'kaltura_mix';
$node->uid = $user->uid;
$node->status = $status ? $status : $_REQUEST['status'];
$node->created = time();
$node->comment = $_REQUEST['comment'];
$node->changed = time();
$node->promote = $_REQUEST['promote'];
$node->sticky = $_REQUEST['sticky'];
kaltura_push_mix_extra_fields($node, $result);
$node->kstatus = $result['entry']['status'];
$node->kaltura_tags = str_replace('a generated show\'', '', $result['entry']['tags']);
$node->kaltura_entryId = $result['entry']['id'];
// Admin tags are not returned in xml from kaltura, so we take them from $_REQUEST
//$node->admin_tags = $result['entry']['admin_tags'];
$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);
}