Skip to content
Snippets Groups Projects
Commit 718adef6 authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: external access of fkeditor image with multicompany

parent 8b16eeb5
No related branches found
No related tags found
No related merge requests found
......@@ -108,7 +108,7 @@ class DolEditor
// Dolibarr utilise toujours liens avec modulepart='fckeditor' quelque soit modulepart.
// Ou se trouve donc cette valeur /viewimage.php?modulepart=fckeditor&file=' ?
$modulepart='fckeditor';
$this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart='.$modulepart.'&file=';
$this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart='.$modulepart.'&entity='.$conf->entity.'&file=';
$this->editor->Config['UserFilesAbsolutePath'] = DOL_DATA_ROOT.'/'.$modulepart.'/' ;
$this->editor->Config['LinkBrowser']=($uselocalbrowser?'true':'false');
......
......@@ -44,7 +44,8 @@ $Config['Enabled'] = true ;
// Path to user files relative to the document root.
$Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=fckeditor&file=' ;
$extEntity=(empty($entity) ? 1 : $entity); // For multicompany with external access
$Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=fckeditor&entity='.$extEntity.'&file=' ;
// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment