- Patch #148972 by drewish: use correct sequence.

6.x
Dries Buytaert 2007-06-04 07:31:59 +00:00
parent 19b8132289
commit a6c8a06c5b
1 changed files with 1 additions and 1 deletions

View File

@ -574,7 +574,7 @@ function file_save_upload($source, $validators = array(), $dest = FALSE, $replac
}
// If we made it this far it's safe to record this file in the database.
$file->fid = db_next_id('fid');
$file->fid = db_next_id('{files}_fid');
db_query("INSERT INTO {files} (fid, uid, filename, filepath, filemime, filesize, status, timestamp) VALUES (%d, %d, '%s', '%s', '%s', %d, %d, %d)", $file->fid, $user->uid, $file->filename, $file->filepath, $file->filemime, $file->filesize, FILE_STATUS_TEMPORARY, time());
// Add file to the cache.