API CHANGE: SiteTree::validURLSegment extendable (#5907)

Uses $this->extend('augmentValidURLSegment')
so that (for instance) Translatable can hook this. (from r99849)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105538 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-05-25 03:16:54 +00:00
parent 097eb6b649
commit 0ab57094a0

View File

@ -1516,7 +1516,16 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
'SiteTree', 'SiteTree',
"\"URLSegment\" = '$this->URLSegment' $IDFilter $parentFilter" "\"URLSegment\" = '$this->URLSegment' $IDFilter $parentFilter"
); );
return !($existingPage); if ($existingPage) {
return false;
}
$values = $this->extend('augmentValidURLSegment');
if (count($values) && !min($values)) {
return false;
}
return true;
} }
/** /**