function filefield_paths_file_presave in File (Field) Paths 8
Same name and namespace in other branches
- 7 filefield_paths.module \filefield_paths_file_presave()
Implements hook_file_presave().
File
- ./
filefield_paths.module, line 375 - Contains core functions for the File (Field) Paths module.
Code
function filefield_paths_file_presave($file) {
// Store original filename in the database.
if ($file->origname
->isEmpty() && !$file->filename
->isEmpty()) {
$file->origname = $file->filename;
}
}