move updateRelativeLink hook after concatination to make it actually updatable

This commit is contained in:
Florian Thoma 2022-08-26 15:32:16 +10:00
parent c130b55ecb
commit 0d5346310f
1 changed files with 5 additions and 3 deletions

View File

@ -688,15 +688,17 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
$base = $this->URLSegment;
}
$this->extend('updateRelativeLink', $base, $action);
// Legacy support: If $action === true, retain URLSegment for homepages,
// but don't append any action
if ($action === true) {
$action = null;
}
return Controller::join_links($base, '/', $action);
$link = Controller::join_links($base, '/', $action);
$this->extend('updateRelativeLink', $link, $base, $action);
return $link;
}
/**