29define(
'NOTOKENRENEWAL', 1);
35require_once
'../../../../main.inc.php';
44$uri = preg_replace(
'/^http(s?):\/\//i',
'', $dolibarr_main_url_root);
45$pos = strstr($uri,
'/');
50$entity = ((!empty($_SESSION[
'dol_entity']) && $_SESSION[
'dol_entity'] > 1) ? $_SESSION[
'dol_entity'] : null);
55$Config[
'Enabled'] =
true;
59$extEntity = (empty($entity) ? 1 : $entity);
61$Config[
'UserFilesPath'] = DOL_URL_ROOT.
'/viewimage.php?modulepart=medias'.(empty($website) ?
'' :
'_'.$website).
'&entity='.$extEntity.
'&file=';
62$Config[
'UserFilesAbsolutePathRelative'] = (!empty($entity) ?
'/'.$entity :
'').(empty($website) ?
'/medias/' : (
'/website/'.$website));
69$Config[
'UserFilesAbsolutePath'] = $dolibarr_main_data_root.$Config[
'UserFilesAbsolutePathRelative'];
73$Config[
'ForceSingleExtension'] =
true;
77$Config[
'SecureImageUploads'] =
true;
80$Config[
'ConfigAllowedCommands'] = array(
'QuickUpload',
'FileUpload',
'GetFolders',
'GetFoldersAndFiles',
'CreateFolder');
83$Config[
'ConfigAllowedTypes'] = array(
'File',
'Image',
'Media');
87$Config[
'HtmlExtensions'] = array(
"html",
"htm",
"xml",
"xsd",
"txt",
"js");
98$Config[
'ChmodOnUpload'] = $newmask;
103$dirmaskdec = octdec($newmask);
105 $dirmaskdec = octdec(
$conf->global->MAIN_UMASK);
107$dirmaskdec |= octdec(
'0200');
108$newmask = decoct($dirmaskdec);
110$Config[
'ChmodOnFolderCreate'] = $newmask;
164$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');
165$Config[
'DeniedExtensions'][
'File'] = array();
166$Config[
'FileTypesPath'][
'File'] = $Config[
'UserFilesPath'].
'file/';
167$Config[
'FileTypesAbsolutePath'][
'File'] = ($Config[
'UserFilesAbsolutePath'] ==
'') ?
'' : $Config[
'UserFilesAbsolutePath'].
'file/';
168$Config[
'QuickUploadPath'][
'File'] = $Config[
'UserFilesPath'];
169$Config[
'QuickUploadAbsolutePath'][
'File'] = $Config[
'UserFilesAbsolutePath'];
171$Config[
'AllowedExtensions'][
'Image'] = array(
'bmp',
'gif',
'jpeg',
'jpg',
'png',
'ai');
173 $Config[
'AllowedExtensions'][
'Image'][] =
'svg';
175$Config[
'DeniedExtensions'][
'Image'] = array();
176$Config[
'FileTypesPath'][
'Image'] = $Config[
'UserFilesPath'].
'image/';
177$Config[
'FileTypesAbsolutePath'][
'Image'] = ($Config[
'UserFilesAbsolutePath'] ==
'') ?
'' : $Config[
'UserFilesAbsolutePath'].
'image/';
178$Config[
'QuickUploadPath'][
'Image'] = $Config[
'UserFilesPath'];
179$Config[
'QuickUploadAbsolutePath'][
'Image'] = $Config[
'UserFilesAbsolutePath'];
181$Config[
'AllowedExtensions'][
'Flash'] = array(
'swf',
'flv');
182$Config[
'DeniedExtensions'][
'Flash'] = array();
183$Config[
'FileTypesPath'][
'Flash'] = $Config[
'UserFilesPath'].
'flash/';
184$Config[
'FileTypesAbsolutePath'][
'Flash'] = ($Config[
'UserFilesAbsolutePath'] ==
'') ?
'' : $Config[
'UserFilesAbsolutePath'].
'flash/';
185$Config[
'QuickUploadPath'][
'Flash'] = $Config[
'UserFilesPath'];
186$Config[
'QuickUploadAbsolutePath'][
'Flash'] = $Config[
'UserFilesAbsolutePath'];
188$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');
189$Config[
'DeniedExtensions'][
'Media'] = array();
190$Config[
'FileTypesPath'][
'Media'] = $Config[
'UserFilesPath'].
'media/';
191$Config[
'FileTypesAbsolutePath'][
'Media'] = ($Config[
'UserFilesAbsolutePath'] ==
'') ?
'' : $Config[
'UserFilesAbsolutePath'].
'media/';
192$Config[
'QuickUploadPath'][
'Media'] = $Config[
'UserFilesPath'];
193$Config[
'QuickUploadAbsolutePath'][
'Media'] = $Config[
'UserFilesAbsolutePath'];
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...