function kaltura_push_extra_data in Kaltura 6
Same name and namespace in other branches
- 5 includes/kaltura.notification.inc \kaltura_push_extra_data()
- 6.2 includes/kaltura.notification.inc \kaltura_push_extra_data()
2 calls to kaltura_push_extra_data()
- kaltura_notify_node_entry_add in includes/
kaltura.notification.inc - kaltura_notify_node_update in includes/
kaltura.notification.inc
File
- includes/
kaltura.notification.inc, line 197
Code
function kaltura_push_extra_data(&$node, $data) {
$fields = array(
'kaltura_media_type' => 'media_type',
'kaltura_duration' => 'length_in_msecs',
'kaltura_thumbnail_url' => 'thumbnail_url',
'kaltura_partner_data' => 'partner_data',
'kaltura_source' => 'source',
'kaltura_source_id' => 'source_id',
'kaltura_source_link' => 'source_link',
'kaltura_width' => 'width',
'kaltura_height' => 'height',
'kaltura_download_url' => 'download_url',
'kaltura_media_date' => 'media_date',
'kaltura_views' => 'views',
'kaltura_plays' => 'plays',
'kaltura_votes' => 'votes',
'kaltura_rank' => 'rank',
'kaltura_total_rank' => 'total_rank',
);
foreach ($fields as $node_key => $field) {
if ($data[$field]) {
$node->{$node_key} = $data[$field];
}
if ($data[$field] && $field == 'length_in_msecs') {
$node->{$node_key} = (int) ($data[$field] / 1000);
}
}
}