NavigationConfigForm: Provide proper parents when editing a shared item
refs #5600
This commit is contained in:
parent
91601de398
commit
4b7fbdfa1f
|
@ -186,7 +186,11 @@ class NavigationConfigForm extends ConfigForm
|
|||
public function listAvailableParents($type)
|
||||
{
|
||||
$shared = false;
|
||||
if (($checkbox = $this->getElement('shared')) !== null) {
|
||||
$children = array();
|
||||
if ($this->itemToLoad) {
|
||||
$shared = $this->hasBeenShared($this->itemToLoad);
|
||||
$children = $this->getFlattenedChildren($this->itemToLoad);
|
||||
} elseif (($checkbox = $this->getElement('shared')) !== null) {
|
||||
if ($checkbox->isChecked()) {
|
||||
$shared = true;
|
||||
} else {
|
||||
|
@ -195,8 +199,6 @@ class NavigationConfigForm extends ConfigForm
|
|||
}
|
||||
}
|
||||
|
||||
$children = $this->itemToLoad ? $this->getFlattenedChildren($this->itemToLoad) : array();
|
||||
|
||||
$names = array();
|
||||
if ($shared) {
|
||||
foreach ($this->getShareConfig() as $sectionName => $sectionConfig) {
|
||||
|
|
Loading…
Reference in New Issue