From b91b49fe5b06d06fbb646d3fb09dd483555a6e5f Mon Sep 17 00:00:00 2001 From: Heshan Wanigasooriya Date: Tue, 16 Jun 2009 14:04:45 +0000 Subject: #488616 #comment-1707148 by gatsu_1981 : Upload Video module seems designed to lose your converted video. Patch created and applied to Drupal 6 branch. Missing video files after upload fixed!. --- types/video_upload/video_upload.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/video_upload/video_upload.module b/types/video_upload/video_upload.module index cc6443a..e2cf6d9 100644 --- a/types/video_upload/video_upload.module +++ b/types/video_upload/video_upload.module @@ -487,7 +487,7 @@ function _video_upload_store_file(&$file, &$node) { if (file_move($file, file_directory_path())) { // file moved successfully // update the file db entry - db_query("UPDATE {files} SET filename = '%s', filepath = '%s', filemime = '%s', filesize = %d WHERE fid = %d", $file->filename, $file->filepath, $file->filemime, $file->filesize, $file->fid); + db_query("UPDATE {files} SET filename = '%s', filepath = '%s', filemime = '%s', filesize = %d, status = %d WHERE fid = %d", $file->filename, $file->filepath, $file->filemime, $file->filesize, 1, $file->fid); // add an entry in the file_revisions table db_query("INSERT INTO {video_upload} (vid, nid, fid) VALUES (%d, %d, %d)", $node->vid, $node->nid, $file->fid); // update the file db entry -- cgit v1.2.3