28define(
'NOTOKENRENEWAL', 1);
34require_once
'../../../../main.inc.php';
35$uri = preg_replace(
'/^http(s?):\/\//i',
'', $dolibarr_main_url_root);
36$pos = strstr($uri,
'/');
41$entity = ((!empty($_SESSION[
'dol_entity']) && $_SESSION[
'dol_entity'] > 1) ? $_SESSION[
'dol_entity'] : null);
46$Config[
'Enabled'] =
true;
50$extEntity = (empty($entity) ? 1 : $entity);
52$Config[
'UserFilesPath'] = DOL_URL_ROOT.
'/viewimage.php?modulepart=medias'.(empty($website) ?
'' :
'_'.$website).
'&entity='.$extEntity.
'&file=';
53$Config[
'UserFilesAbsolutePathRelative'] = (!empty($entity) ?
'/'.$entity :
'').(empty($website) ?
'/medias/' : (
'/website/'.$website));
60$Config[
'UserFilesAbsolutePath'] = $dolibarr_main_data_root.$Config[
'UserFilesAbsolutePathRelative'];
64$Config[
'ForceSingleExtension'] =
true;
68$Config[
'SecureImageUploads'] =
true;
71$Config[
'ConfigAllowedCommands'] = array(
'QuickUpload',
'FileUpload',
'GetFolders',
'GetFoldersAndFiles',
'CreateFolder');
74$Config[
'ConfigAllowedTypes'] = array(
'File',
'Image',
'Media');
78$Config[
'HtmlExtensions'] = array(
"html",
"htm",
"xml",
"xsd",
"txt",
"js");
87 $newmask = $conf->global->MAIN_UMASK;
89$Config[
'ChmodOnUpload'] = $newmask;
94$dirmaskdec = octdec($newmask);
96 $dirmaskdec = octdec($conf->global->MAIN_UMASK);
98$dirmaskdec |= octdec(
'0200');
99$newmask = decoct($dirmaskdec);
101$Config[
'ChmodOnFolderCreate'] = $newmask;
155$Config[
'AllowedExtensions'][
'File'] = array(
'7z',
'aiff',
'asf',
'avi',
'bmp',
'csv',
'doc',
'fla',
'flv',
'gif',
'gz',
'gzip',
'jpeg',
'jpg',
'mid',
'mov',
'mp3',
'mp4',
'mpc',
'mpeg',
'mpg',
'ods',
'odt',
'pdf',
'png',
'ppt',
'pxd',
'qt',
'ram',
'rar',
'rm',
'rmi',
'rmvb',
'rtf',
'sdc',
'sitd',
'swf',
'sxc',
'sxw',
'tar',
'tgz',
'tif',
'tiff',
'txt',
'vsd',
'wav',
'wma',
'wmv',
'xls',
'xml',
'zip');
156$Config[
'DeniedExtensions'][
'File'] = array();
157$Config[
'FileTypesPath'][
'File'] = $Config[
'UserFilesPath'].
'file/';
158$Config[
'FileTypesAbsolutePath'][
'File'] = ($Config[
'UserFilesAbsolutePath'] ==
'') ?
'' : $Config[
'UserFilesAbsolutePath'].
'file/';
159$Config[
'QuickUploadPath'][
'File'] = $Config[
'UserFilesPath'];
160$Config[
'QuickUploadAbsolutePath'][
'File'] = $Config[
'UserFilesAbsolutePath'];
162$Config[
'AllowedExtensions'][
'Image'] = array(
'bmp',
'gif',
'jpeg',
'jpg',
'png',
'ai');
164 $Config[
'AllowedExtensions'][
'Image'][] =
'svg';
166$Config[
'DeniedExtensions'][
'Image'] = array();
167$Config[
'FileTypesPath'][
'Image'] = $Config[
'UserFilesPath'].
'image/';
168$Config[
'FileTypesAbsolutePath'][
'Image'] = ($Config[
'UserFilesAbsolutePath'] ==
'') ?
'' : $Config[
'UserFilesAbsolutePath'].
'image/';
169$Config[
'QuickUploadPath'][
'Image'] = $Config[
'UserFilesPath'];
170$Config[
'QuickUploadAbsolutePath'][
'Image'] = $Config[
'UserFilesAbsolutePath'];
172$Config[
'AllowedExtensions'][
'Flash'] = array(
'swf',
'flv');
173$Config[
'DeniedExtensions'][
'Flash'] = array();
174$Config[
'FileTypesPath'][
'Flash'] = $Config[
'UserFilesPath'].
'flash/';
175$Config[
'FileTypesAbsolutePath'][
'Flash'] = ($Config[
'UserFilesAbsolutePath'] ==
'') ?
'' : $Config[
'UserFilesAbsolutePath'].
'flash/';
176$Config[
'QuickUploadPath'][
'Flash'] = $Config[
'UserFilesPath'];
177$Config[
'QuickUploadAbsolutePath'][
'Flash'] = $Config[
'UserFilesAbsolutePath'];
179$Config[
'AllowedExtensions'][
'Media'] = array(
'aiff',
'asf',
'avi',
'bmp',
'fla',
'flv',
'gif',
'jpeg',
'jpg',
'mid',
'mov',
'mp3',
'mp4',
'mpc',
'mpeg',
'mpg',
'png',
'qt',
'ram',
'rm',
'rmi',
'rmvb',
'swf',
'tif',
'tiff',
'wav',
'wma',
'wmv');
180$Config[
'DeniedExtensions'][
'Media'] = array();
181$Config[
'FileTypesPath'][
'Media'] = $Config[
'UserFilesPath'].
'media/';
182$Config[
'FileTypesAbsolutePath'][
'Media'] = ($Config[
'UserFilesAbsolutePath'] ==
'') ?
'' : $Config[
'UserFilesAbsolutePath'].
'media/';
183$Config[
'QuickUploadPath'][
'Media'] = $Config[
'UserFilesPath'];
184$Config[
'QuickUploadAbsolutePath'][
'Media'] = $Config[
'UserFilesAbsolutePath'];
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.