Only force absolute URLs for media items if cms.linkPolicy = force
This fixes #4082 & rainlab/pages-plugin#405. Reverts a previous breaking change from Build 444 (introduced in #3536) by limiting the scope to which it applies.
This commit is contained in:
parent
158fc43f62
commit
ccb2c372bb
|
|
@ -537,9 +537,13 @@ class MediaLibrary
|
||||||
{
|
{
|
||||||
$path = $this->validatePath($path);
|
$path = $this->validatePath($path);
|
||||||
|
|
||||||
$fullPath = $this->storagePath.implode("/", array_map("rawurlencode", explode("/", $path)));
|
$fullPath = $this->storagePath . implode("/", array_map("rawurlencode", explode("/", $path)));
|
||||||
|
|
||||||
return Url::to($fullPath);
|
if (Config::get('cms.linkPolicy') === 'force') {
|
||||||
|
return Url::to($fullPath);
|
||||||
|
} else {
|
||||||
|
return $fullPath;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue