function _file_entity_mass_update_helper in File Entity (fieldable files) 7.2
Same name and namespace in other branches
- 7.3 file_entity.admin.inc \_file_entity_mass_update_helper()
File Mass Update - helper function.
2 calls to _file_entity_mass_update_helper()
- file_entity_mass_update in ./
file_entity.admin.inc - Make mass update of files.
- _file_entity_mass_update_batch_process in ./
file_entity.admin.inc - File Mass Update Batch operation.
File
- ./
file_entity.admin.inc, line 216
Code
function _file_entity_mass_update_helper($fid, $updates) {
$file = file_load($fid);
// For efficiency manually save the original file before applying any changes.
$file->original = clone $file;
foreach ($updates as $name => $value) {
$file->{$name} = $value;
}
file_save($file);
return $file;
}