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:
Ingo Schommer 2013-03-19 01:24:28 -07:00
commit 75c77c4361

View File

@ -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) {