Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/utility/event.php
Show First 20 Lines • Show All 420 Lines • ▼ Show 20 Line(s) | |||||
$top_prefix = $this->getEventParam('top_prefix'); | $top_prefix = $this->getEventParam('top_prefix'); | ||||
if ($top_prefix == false) { | if ($top_prefix == false) { | ||||
$top_prefix = $this->Application->GetTopmostPrefix($this->Prefix, true); | $top_prefix = $this->Application->GetTopmostPrefix($this->Prefix, true); | ||||
$this->setEventParam('top_prefix', $top_prefix); | $this->setEventParam('top_prefix', $top_prefix); | ||||
} | } | ||||
$section = $this->Application->getUnitOption($top_prefix.'.main', 'PermSection'); | $section = $this->Application->getUnitOption($top_prefix.'.main', 'PermSection'); | ||||
// 2. check if this section has perm_prefix mapping to other prefix | // 2. check if this section has perm_prefix mapping to other prefix | ||||
/** @var kSectionsHelper $sections_helper */ | |||||
$sections_helper = $this->Application->recallObject('SectionsHelper'); | $sections_helper = $this->Application->recallObject('SectionsHelper'); | ||||
/* @var $sections_helper kSectionsHelper */ | |||||
$section_data =& $sections_helper->getSectionData($section); | $section_data =& $sections_helper->getSectionData($section); | ||||
if ($section_data && isset($section_data['perm_prefix']) && $section_data['perm_prefix'] != $top_prefix) { | if ($section_data && isset($section_data['perm_prefix']) && $section_data['perm_prefix'] != $top_prefix) { | ||||
$this->setEventParam('top_prefix', $section_data['perm_prefix']); | $this->setEventParam('top_prefix', $section_data['perm_prefix']); | ||||
$section = $this->Application->getUnitOption($section_data['perm_prefix'].'.main', 'PermSection'); | $section = $this->Application->getUnitOption($section_data['perm_prefix'].'.main', 'PermSection'); | ||||
} | } | ||||
if (!$section) { | if (!$section) { | ||||
Show All 11 Lines |