Fix test to upload a file
This commit is contained in:
parent
bc9201b073
commit
9224061aed
@ -47,7 +47,7 @@ if (GETPOST('sendit') && !empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
dol_add_file_process($upload_dir, 0, 0, 'userfile');
|
||||
dol_add_file_process($upload_dir, 1, 0, 'userfile');
|
||||
}
|
||||
|
||||
if ($action == 'updateform')
|
||||
|
||||
@ -1091,6 +1091,11 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
|
||||
dol_syslog("Files.lib::dol_move_uploaded_file File ".$file_name." already exists. Return 'ErrorFileAlreadyExists'", LOG_WARNING);
|
||||
return 'ErrorFileAlreadyExists';
|
||||
}
|
||||
} else { // We are allowed to erase
|
||||
if (is_dir($file_name_osencoded)) { // If there is a directory with name of file to create
|
||||
dol_syslog("Files.lib::dol_move_uploaded_file A directory with name ".$file_name." already exists. Return 'ErrorDirWithFileNameAlreadyExists'", LOG_WARNING);
|
||||
return 'ErrorDirWithFileNameAlreadyExists';
|
||||
}
|
||||
}
|
||||
|
||||
// Move file
|
||||
|
||||
Loading…
Reference in New Issue
Block a user