mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENH Provide hook for updating the parent used for absoluteURL (#10168)
One use case for this that I've run into a few times is for sending emails using a queued job from the CLI.
This commit is contained in:
parent
83156dd9c9
commit
fc2160fa3a
@ -470,6 +470,7 @@ class Director implements TemplateGlobalProvider
|
|||||||
// Default to respecting site base_url
|
// Default to respecting site base_url
|
||||||
$parent = self::absoluteBaseURL();
|
$parent = self::absoluteBaseURL();
|
||||||
}
|
}
|
||||||
|
static::singleton()->extend('updateAbsoluteURLParent', $parent);
|
||||||
|
|
||||||
// Map empty urls to relative slash and join to base
|
// Map empty urls to relative slash and join to base
|
||||||
if (empty($url) || $url === '.' || $url === './') {
|
if (empty($url) || $url === '.' || $url === './') {
|
||||||
|
Loading…
Reference in New Issue
Block a user