function content_public_files_form_submit

7.x content.module content_public_files_form_submit($form, $form_state)
6.x content.module content_public_files_form_submit($form, $form_state)

File

modules/content/content.module, line 476

Code

function content_public_files_form_submit($form, $form_state) {
  if (isset($form_state ['values']['upload_btn']) && $form_state ['values']['upload_btn'] != "") {
    // The user is trying to upload a file.

    $file = $_FILES ["upload_file"];
    $temp = fp_re_array_files($file);
    $file = $temp [0];

    $_SESSION ['public_file_form_overwrite_val'] = $form_state ['values']['overwrite'];

    content_add_new_uploaded_file($file, 0, !$form_state ['values']['overwrite'], CONTENT_PUBLIC_FILE, TRUE);

    fp_add_message("File uploaded successfully.");


  }
}