1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Fix broken file upload - temp file unexpectedly renamed

This commit is contained in:
Miroslav Yovchev
2016-03-21 19:21:41 +02:00
parent 9a7ec8908c
commit 8ce130266e

View File

@@ -300,7 +300,9 @@ function process_uploaded_files($uploaddir, $fileinfo = FALSE, $options = NULL)
if (!$first_error) // All tests passed - can store it somewhere if (!$first_error) // All tests passed - can store it somewhere
{ {
$uploaded[$c] = e107::getFile()->get_file_info($uploadfile,true); // File upload broken - temp file renamed.
// FIXME - method starting with 'get' shouldn't do system file changes.
$uploaded[$c] = e107::getFile()->get_file_info($uploadfile, true, false);
$uploaded[$c]['name'] = $name; $uploaded[$c]['name'] = $name;
$uploaded[$c]['rawname'] = $raw_name; $uploaded[$c]['rawname'] = $raw_name;