From 4c39dbd94cefcf684a3c70653b672e8de053a45b Mon Sep 17 00:00:00 2001 From: Fabio Varesano Date: Thu, 22 Jun 2006 19:38:49 +0000 Subject: 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. --- plugins/video_upload/video_upload.module | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins') 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'; + } } } -- cgit v1.2.3