function scald_video_scald_atom_insert in Scald: Media Management made easy 7
Implements hook_scald_atom_insert().
File
- modules/
providers/ scald_video/ scald_video.module, line 85 - Scald Video is a Scald Atom Provider for video files.
Code
function scald_video_scald_atom_insert($atom) {
if ($atom->provider == 'scald_video') {
$file = file_load($atom->data['video_id']);
if ($file) {
$file->status = FILE_STATUS_PERMANENT;
file_save($file);
file_usage_add($file, 'scald_video', 'scald_atom', $atom->sid);
}
}
}