mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 23:52:24 +01:00
Fix when alt path is full url instead of relative.
This commit is contained in:
@@ -287,8 +287,14 @@ function dol_buildpath($path, $type=0)
|
||||
//print $key.'-'.$dirroot.'/'.$path.'-'.$conf->file->dol_url_root[$type].'<br>'."\n";
|
||||
if (file_exists($dirroot.'/'.$path))
|
||||
{
|
||||
if ($type == 1) $res=DOL_URL_ROOT.$conf->file->dol_url_root[$key].'/'.$path;
|
||||
if ($type == 2) $res=DOL_MAIN_URL_ROOT.$conf->file->dol_url_root[$key].'/'.$path;
|
||||
if ($type == 1)
|
||||
{
|
||||
$res=(preg_match('/^http/i',$conf->file->dol_url_root[$key])?'':DOL_URL_ROOT).$conf->file->dol_url_root[$key].'/'.$path;
|
||||
}
|
||||
if ($type == 2)
|
||||
{
|
||||
$res=(preg_match('/^http/i',$conf->file->dol_url_root[$key])?'':DOL_MAIN_URL_ROOT).$conf->file->dol_url_root[$key].'/'.$path;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user