Index: branches/5.3.x/core/kernel/utility/event.php
===================================================================
diff -u -N -r15483 -r15698
--- branches/5.3.x/core/kernel/utility/event.php (.../event.php) (revision 15483)
+++ branches/5.3.x/core/kernel/utility/event.php (.../event.php) (revision 15698)
@@ -1,6 +1,6 @@
getEventParam('PermSection');
- if ($perm_section) {
+
+ if ( $perm_section ) {
return $perm_section;
}
// 1. get section by current top_prefix
$top_prefix = $this->getEventParam('top_prefix');
- if ($top_prefix == false) {
+
+ if ( $top_prefix == false ) {
$top_prefix = $this->Application->GetTopmostPrefix($this->Prefix, true);
$this->setEventParam('top_prefix', $top_prefix);
}
- $section = $this->Application->getUnitOption($top_prefix.'.main', 'PermSection');
+ $section = $this->Application->getUnitConfig($top_prefix)->getPermSectionByName('main');
+
// 2. check if this section has perm_prefix mapping to other prefix
$sections_helper = $this->Application->recallObject('SectionsHelper');
/* @var $sections_helper kSectionsHelper */
$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']);
- $section = $this->Application->getUnitOption($section_data['perm_prefix'].'.main', 'PermSection');
+ $section = $this->Application->getUnitConfig($section_data['perm_prefix'])->getPermSectionByName('main');
}
- if (!$section) {
+ if ( !$section ) {
throw new Exception('Permission section not specified for prefix ' . $top_prefix . '');
}