Merge pull request #5955 from hregis/3.9_bug
FIX external access of fckeditor image (external emailing)
This commit is contained in:
commit
f0151c5a4c
@ -108,7 +108,7 @@ class DolEditor
|
|||||||
// Dolibarr utilise toujours liens avec modulepart='fckeditor' quelque soit modulepart.
|
// Dolibarr utilise toujours liens avec modulepart='fckeditor' quelque soit modulepart.
|
||||||
// Ou se trouve donc cette valeur /viewimage.php?modulepart=fckeditor&file=' ?
|
// Ou se trouve donc cette valeur /viewimage.php?modulepart=fckeditor&file=' ?
|
||||||
$modulepart='fckeditor';
|
$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['UserFilesAbsolutePath'] = DOL_DATA_ROOT.'/'.$modulepart.'/' ;
|
||||||
|
|
||||||
$this->editor->Config['LinkBrowser']=($uselocalbrowser?'true':'false');
|
$this->editor->Config['LinkBrowser']=($uselocalbrowser?'true':'false');
|
||||||
|
|||||||
@ -44,7 +44,8 @@ $Config['Enabled'] = true ;
|
|||||||
|
|
||||||
|
|
||||||
// Path to user files relative to the document root.
|
// 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
|
// 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
|
// user files directory. Useful if you are using a virtual directory, symbolic
|
||||||
|
|||||||
@ -36,6 +36,12 @@ if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
|||||||
if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1'); // Disable "main.inc.php" hooks
|
if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1'); // Disable "main.inc.php" hooks
|
||||||
// Pour autre que companylogo, on charge environnement + info issus de logon comme le user
|
// Pour autre que companylogo, on charge environnement + info issus de logon comme le user
|
||||||
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'companylogo') && ! defined("NOLOGIN")) define("NOLOGIN",'1');
|
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'companylogo') && ! defined("NOLOGIN")) define("NOLOGIN",'1');
|
||||||
|
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'fckeditor') && ! defined("NOLOGIN")) {
|
||||||
|
define("NOLOGIN",'1');
|
||||||
|
// For multicompany
|
||||||
|
$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
|
||||||
|
if (is_numeric($entity)) define("DOLENTITY", $entity);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Header empty
|
* Header empty
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user