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