Fixed issues with files upload
This commit is contained in:
parent
e3619915cc
commit
6358f3fc9b
|
@ -76,7 +76,7 @@ echo '<h4>'.__('Index of %s', $directory).'</h4>';
|
|||
$upload_file_or_zip = (bool) get_parameter('upload_file_or_zip');
|
||||
$create_text_file = (bool) get_parameter('create_text_file');
|
||||
|
||||
$default_real_directory = realpath($config['homedir'].'/'.$fallback_directory);
|
||||
$default_real_directory = realpath($config['homedir'].'/');
|
||||
|
||||
if ($upload_file_or_zip === true) {
|
||||
upload_file($upload_file_or_zip, $default_real_directory);
|
||||
|
|
|
@ -139,6 +139,13 @@ function upload_file($upload_file_or_zip, $default_real_directory)
|
|||
$config['filemanager']['correct_upload_file'] = 0;
|
||||
$config['filemanager']['message'] = null;
|
||||
|
||||
$homedir_filemanager = trim($config['homedir']);
|
||||
$sec2 = get_parameter('sec2');
|
||||
|
||||
if ($sec2 === 'enterprise/godmode/agentes/collections' || $sec2 === 'advanced/collections') {
|
||||
$homedir_filemanager .= io_safe_output($config['attachment_store']).'/collection';
|
||||
}
|
||||
|
||||
check_login();
|
||||
|
||||
if (! check_acl($config['id_user'], 0, 'AW')) {
|
||||
|
@ -295,7 +302,11 @@ $create_dir = (bool) get_parameter('create_dir');
|
|||
if ($create_dir === true) {
|
||||
global $config;
|
||||
|
||||
$homedir_filemanager = io_safe_output($config['attachment_store']).'/collection';
|
||||
$homedir_filemanager = trim($config['homedir']);
|
||||
$sec2 = get_parameter('sec2');
|
||||
if ($sec2 === 'enterprise/godmode/agentes/collections' || $sec2 === 'advanced/collections') {
|
||||
$homedir_filemanager .= io_safe_output($config['attachment_store']).'/collection';
|
||||
}
|
||||
|
||||
$config['filemanager'] = [];
|
||||
$config['filemanager']['correct_create_dir'] = 0;
|
||||
|
|
Loading…
Reference in New Issue