diff options
author | prashant | 2015-04-15 17:37:18 +0530 |
---|---|---|
committer | prashant | 2015-04-15 17:37:18 +0530 |
commit | 96743e5f2674f353030512da2a58db05658912c2 (patch) | |
tree | 05bb442d1f85cbfa441377182a35275770bc7666 | |
parent | be2b10d3633d00e0919bf96f7aa7e89004a21e11 (diff) | |
download | DWSIM_textbook_companion-96743e5f2674f353030512da2a58db05658912c2.tar.gz DWSIM_textbook_companion-96743e5f2674f353030512da2a58db05658912c2.tar.bz2 DWSIM_textbook_companion-96743e5f2674f353030512da2a58db05658912c2.zip |
set default filemime as dwxml for uploading files
-rwxr-xr-x | code.inc | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -382,12 +382,11 @@ function upload_examples_form_submit($form, &$form_state) { if (move_uploaded_file($_FILES['files']['tmp_name'][$file_form_name], $root_path . $dest_path . $_FILES['files']['name'][$file_form_name])) { /* for uploaded files making an entry in the database */ - db_query("INSERT INTO {textbook_companion_example_files} (example_id, filename, filepath, filemime, filesize, filetype, timestamp) - VALUES (%d, '%s', '%s', '%s', %d, '%s', %d)", + db_query("INSERT INTO {textbook_companion_example_files} (example_id, filename, filepath, filesize, filetype, timestamp) + VALUES (%d, '%s', '%s', %d, '%s', %d)", $example_id, $_FILES['files']['name'][$file_form_name], - $dest_path . $_FILES['files']['name'][$file_form_name], - $_FILES['files']['type'][$file_form_name], + $dest_path . $_FILES['files']['name'][$file_form_name], $_FILES['files']['size'][$file_form_name], $file_type, time() |