Skip to content

Commit

Permalink
update DLMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathologic committed Aug 1, 2017
1 parent 60e644c commit 9b2b89f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ public function getDocs($tvlist = '')
$maxDepth = $this->getCFGDef('maxDepth', 10);
//TODO кэширование
if ($this->getCFGDef('hideSubMenus', 0) && empty($this->getCFGDef('openIds'))) {
$maxDepth = $this->setActiveBranch($this->getHereId());
$maxDepth = min($maxDepth, $this->setActiveBranch($this->getHereId()));
if (empty(array_intersect($this->IDs, $this->activeBranch))) {
$maxDepth = 1;
$this->config->setConfig(array('hideSubMenus' => 0));
};
} else {
$this->setActiveBranch($this->getHereId());
}
Expand Down Expand Up @@ -243,6 +247,7 @@ public function _render($tpl = '')
unset($docs[$currentLevel]);
$currentLevel--;
}

unset($data);
$out = '';
$joinMenus = $this->getCFGDef('joinMenus', 0) && !$this->getCFGDef('showParents', 0);
Expand Down

0 comments on commit 9b2b89f

Please sign in to comment.