mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API CHANGE: SiteTree::validURLSegment extendable (#5907)
Uses $this->extend('augmentValidURLSegment') so that (for instance) Translatable can hook this. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99849 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
3ec85156d1
commit
5531e01a69
@ -1499,7 +1499,16 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
'SiteTree',
|
||||
"\"URLSegment\" = '$this->URLSegment' $IDFilter $parentFilter"
|
||||
);
|
||||
return !($existingPage);
|
||||
if ($existingPage) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$values = $this->extend('augmentValidURLSegment');
|
||||
if (count($values) && !min($values)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user