Index: branches/5.2.x/core/units/email_events/email_events_event_handler.php =================================================================== diff -u -N -r14968 -r14989 --- branches/5.2.x/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 14968) +++ branches/5.2.x/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 14989) @@ -1,6 +1,6 @@ Application->GetVar('module'); - if (strlen($module) > 0) { + if ( strlen($module) > 0 ) { // checking permission when lising module email events in separate section $module = explode(':', $module, 2); - if (count($module) == 1) { + 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] ]; + $exceptions = Array ('Category' => 'c', 'Users' => 'u'); + $main_prefix = $exceptions[$module[1]]; } - $section = $this->Application->getUnitOption($main_prefix.'.email', 'PermSection'); + $section = $this->Application->getUnitOption($main_prefix . '.email', 'PermSection'); $event->setEventParam('PermSection', $section); } @@ -82,17 +85,19 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(&$event) + protected function SetCustomQuery(kEvent &$event) { + parent::SetCustomQuery($event); + $object =& $event->getObject(); /* @var $object kDBList */ - if ($event->Special == 'module') { + if ( $event->Special == 'module' ) { $module = $this->Application->GetVar('module'); - $object->addFilter('module_filter', '%1$s.Module = '.$this->Conn->qstr($module)); + $object->addFilter('module_filter', '%1$s.Module = ' . $this->Conn->qstr($module)); } - if (!$event->Special && !$this->Application->isDebugMode()) { + if ( !$event->Special && !$this->Application->isDebugMode() ) { // no special $object->addFilter('enabled_filter', '%1$s.Enabled <> ' . STATUS_DISABLED); }