Index: branches/RC/core/units/email_events/email_events_event_handler.php =================================================================== diff -u -N -r11538 -r11654 --- branches/RC/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 11538) +++ branches/RC/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 11654) @@ -27,18 +27,24 @@ function CheckPermission(&$event) { $module = $this->Application->GetVar('module'); - $module = explode(':', $module, 2); - if (count($module) == 1) { - $main_prefix = $this->Application->findModule('Name', $module[0], 'Var'); + if (strlen($module) > 0) { + // checking permission when lising module email events in separate section + $module = explode(':', $module, 2); + + if (count($module) == 1) { + $main_prefix = $this->Application->findModule('Name', $module[0], 'Var'); + } + else { + $exceptions = Array('Category' => 'c', 'Users' => 'u'); + $main_prefix = $exceptions[ $module[1] ]; + } + $section = $this->Application->getUnitOption($main_prefix.'.email', 'PermSection'); + + $event->setEventParam('PermSection', $section); } - else { - $exceptions = Array('Category' => 'c', 'Users' => 'u'); - $main_prefix = $exceptions[ $module[1] ]; - } - $section = $this->Application->getUnitOption($main_prefix.'.email', 'PermSection'); - $event->setEventParam('PermSection', $section); + // checking permission when listing all email events when editing language return parent::CheckPermission($event); }