function scald_flash_scald_atom_insert in Scald: Media Management made easy 7
Implements hook_scald_atom_insert().
File
- modules/
providers/ scald_flash/ scald_flash.module, line 83 - Defines a flash provider for Scald.
Code
function scald_flash_scald_atom_insert($atom) {
if ($atom->provider == 'scald_flash') {
$file = file_load($atom->base_id);
if ($file) {
$file->status = FILE_STATUS_PERMANENT;
file_save($file);
file_usage_add($file, 'scald_flash', 'scald_atom', $atom->sid);
}
}
}