Skip to content

Commit

Permalink
Fix medias could not be loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Mar 13, 2017
1 parent 277fa7d commit 6aeae12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/core/lib/files.lib.php
Expand Up @@ -1807,7 +1807,8 @@ function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('(\.meta
function dol_check_secure_access_document($modulepart,$original_file,$entity,$fuser='',$refname='')
{
global $user, $conf, $db;

global $dolibarr_main_data_root;

if (! is_object($fuser)) $fuser=$user;

if (empty($modulepart)) return 'ErrorBadParameter';
Expand Down Expand Up @@ -2255,7 +2256,6 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
elseif ($modulepart == 'medias' && !empty($dolibarr_main_data_root))
{
$accessallowed=1;
global $dolibarr_main_data_root;
$original_file=$dolibarr_main_data_root.'/medias/'.$original_file;
}

Expand Down

0 comments on commit 6aeae12

Please sign in to comment.