Fix: some problems with medias in multicompany
This commit is contained in:
parent
bb53146192
commit
762b4eb876
@ -88,6 +88,7 @@ class Conf
|
|||||||
$this->user = new stdClass();
|
$this->user = new stdClass();
|
||||||
$this->syslog = new stdClass();
|
$this->syslog = new stdClass();
|
||||||
$this->browser = new stdClass();
|
$this->browser = new stdClass();
|
||||||
|
$this->medias = new stdClass();
|
||||||
$this->multicompany = new stdClass();
|
$this->multicompany = new stdClass();
|
||||||
|
|
||||||
//! Charset for HTML output and for storing data in memory
|
//! Charset for HTML output and for storing data in memory
|
||||||
@ -322,6 +323,10 @@ class Conf
|
|||||||
$this->propal->dir_output=$rootfordata."/propale";
|
$this->propal->dir_output=$rootfordata."/propale";
|
||||||
$this->propal->dir_temp=$rootfordata."/propale/temp";
|
$this->propal->dir_temp=$rootfordata."/propale/temp";
|
||||||
|
|
||||||
|
// For medias storage
|
||||||
|
$this->medias->multidir_output = array($this->entity => $rootfordata."/medias");
|
||||||
|
$this->medias->multidir_temp = array($this->entity => $rootfordata."/medias/temp");
|
||||||
|
|
||||||
// Exception: Some dir are not the name of module. So we keep exception here for backward compatibility.
|
// Exception: Some dir are not the name of module. So we keep exception here for backward compatibility.
|
||||||
|
|
||||||
// Sous module bons d'expedition
|
// Sous module bons d'expedition
|
||||||
|
|||||||
@ -1875,7 +1875,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
|||||||
if ($modulepart == 'medias' && !empty($dolibarr_main_data_root))
|
if ($modulepart == 'medias' && !empty($dolibarr_main_data_root))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$dolibarr_main_data_root.'/medias/'.$original_file;
|
$original_file=$conf->medias->multidir_output[$entity].'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping for *.log files, like when used with url http://.../document.php?modulepart=logs&file=dolibarr.log
|
// Wrapping for *.log files, like when used with url http://.../document.php?modulepart=logs&file=dolibarr.log
|
||||||
elseif ($modulepart == 'logs' && !empty($dolibarr_main_data_root))
|
elseif ($modulepart == 'logs' && !empty($dolibarr_main_data_root))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user