mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #304 from g4b0/8300-allowed-children-contextual-menu
Re-indexed disallowed array because of json_encode issue
This commit is contained in:
commit
75c77c4361
@ -422,7 +422,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
// then add the ones which are globally disallowed.
|
||||
$disallowed = array_diff($classes, (array)$allowed);
|
||||
$disallowed = array_unique(array_merge($disallowed, $globalDisallowed));
|
||||
if($disallowed) $def[$class]['disallowedChildren'] = $disallowed;
|
||||
// Re-index the array for JSON non sequential key issue
|
||||
if($disallowed) $def[$class]['disallowedChildren'] = array_values($disallowed);
|
||||
|
||||
$defaultChild = $obj->defaultChild();
|
||||
if($defaultChild != 'Page' && $defaultChild != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user