Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/utility/event.php
Show First 20 Lines • Show All 424 Lines • ▼ Show 20 Line(s) | |||||
} | } | ||||
$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 */ | /** @var kSectionsHelper $sections_helper */ | ||||
$sections_helper = $this->Application->recallObject('SectionsHelper'); | $sections_helper = $this->Application->recallObject('SectionsHelper'); | ||||
$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) { | |||||
$this->setEventParam('top_prefix', $section_data['perm_prefix']); | if ( $section_data && $section_data['SectionPrefix'] != $top_prefix) { | ||||
Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace: Expected 1 spaces before "if" closing bracket; 0 found | |||||
$section = $this->Application->getUnitOption($section_data['perm_prefix'].'.main', 'PermSection'); | $this->setEventParam('top_prefix', $section_data['SectionPrefix']); | ||||
$section = $this->Application->getUnitOption($section_data['SectionPrefix'] . '.main', 'PermSection'); | |||||
} | } | ||||
if (!$section) { | if (!$section) { | ||||
throw new Exception('Permission <strong>section</strong> not specified for prefix <strong>' . $top_prefix . '</strong>'); | throw new Exception('Permission <strong>section</strong> not specified for prefix <strong>' . $top_prefix . '</strong>'); | ||||
} | } | ||||
return $section; | return $section; | ||||
} | } | ||||
public function __toString() | public function __toString() | ||||
{ | { | ||||
return $this->getPrefixSpecial() . ':' . $this->Name; | return $this->getPrefixSpecial() . ':' . $this->Name; | ||||
} | } | ||||
} | } |
Expected 1 spaces before "if" closing bracket; 0 found