You are here

function webform_file_rename in Webform 7.4

Rename any files which are eligible for renaming.

Renames if this submission is being submitted for the first time.

2 calls to webform_file_rename()
webform_webform_submission_insert in ./webform.module
Implements hook_webform_submission_insert().
webform_webform_submission_update in ./webform.module
Implements hook_webform_submission_update().

File

components/file.inc, line 622
Webform module file component.

Code

function webform_file_rename($node, $submission) {
  if (isset($submission->file_usage)) {
    foreach ($submission->file_usage['renameable'] as $cid => $fids) {
      foreach ($fids as $fid) {
        webform_file_process_rename($node, $submission, $node->webform['components'][$cid], $fid);
      }
    }
  }
}