mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 11:05:59 +02:00
fixes URLSegment validation for non nested urls
This commit is contained in:
parent
818d7e27bd
commit
1b196d8a83
@ -1799,11 +1799,13 @@ class Translatable extends DataExtension implements PermissionProvider {
|
||||
$IDFilter = ($this->owner->ID) ? "AND \"SiteTree\".\"ID\" <> {$this->owner->ID}" : null;
|
||||
$parentFilter = null;
|
||||
|
||||
if (Config::inst()->get('SiteTree', 'nested_urls')) {
|
||||
if($this->owner->ParentID) {
|
||||
$parentFilter = " AND \"SiteTree\".\"ParentID\" = {$this->owner->ParentID}";
|
||||
} else {
|
||||
$parentFilter = ' AND "SiteTree"."ParentID" = 0';
|
||||
}
|
||||
}
|
||||
|
||||
$existingPage = SiteTree::get()
|
||||
// disable get_one cache, as this otherwise may pick up results from when locale_filter was on
|
||||
|
Loading…
Reference in New Issue
Block a user