aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorFabio Varesano <fax8@13637.no-reply.drupal.org>2006-06-22 19:38:49 +0000
committerFabio Varesano <fax8@13637.no-reply.drupal.org>2006-06-22 19:38:49 +0000
commit4c39dbd94cefcf684a3c70653b672e8de053a45b (patch)
tree2e2cc5b7d8d3af1e118c07fb11549a7a9361eeaf /plugins
parent964d84132d8699db78cd36ac5c54f252315ef1d0 (diff)
downloadvideo-4c39dbd94cefcf684a3c70653b672e8de053a45b.tar.gz
video-4c39dbd94cefcf684a3c70653b672e8de053a45b.tar.bz2
Solved a bug which let recorded to DB the temporary
video file path instead the final video path. Thanks to Sean Effel (Seanjuan) for giving me access to his server. Mine didn't showed this bug.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/video_upload/video_upload.module4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/video_upload/video_upload.module b/plugins/video_upload/video_upload.module
index 34515a3..b06389b 100644
--- a/plugins/video_upload/video_upload.module
+++ b/plugins/video_upload/video_upload.module
@@ -203,12 +203,14 @@ function _video_upload_store(&$node) {
$file = $_SESSION['video_upload_file'];
$dest_dir = variable_get('video_upload_default_path', 'videos') .'/';
if ($file = file_save_upload($file, $dest_dir . $file->filename)) {
- $file = $_SESSION['video_upload_file'];
$file->fid = db_next_id('{files}_fid');
db_query("INSERT INTO {files} (fid, nid, filename, filepath, filemime, filesize) VALUES (%d, %d, '%s', '%s', '%s', %d)", $file->fid, $node->nid, $file->filename, $file->filepath, $file->filemime, $file->filesize);
db_query("INSERT INTO {file_revisions} (fid, vid, list, description) VALUES (%d, %d, %d, '%s')", $file->fid, $node->vid, $file->list, $file->description);
unset($_SESSION['video_upload_file']);
}
+ else {
+ print 'error';
+ }
}
}