Fix when alt path is full url instead of relative.
This commit is contained in:
parent
8f71e5fda2
commit
b26250c45a
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user