Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/event_handler.php
Show First 20 Lines • Show All 185 Lines • ▼ Show 20 Line(s) | |||||
* Checks user permission to execute given $event | * Checks user permission to execute given $event | ||||
* | * | ||||
* @param kEvent $event | * @param kEvent $event | ||||
* @return bool | * @return bool | ||||
* @access public | * @access public | ||||
*/ | */ | ||||
public function CheckPermission(kEvent $event) | public function CheckPermission(kEvent $event) | ||||
{ | { | ||||
/** @var kPermissionsHelper $perm_helper */ | |||||
$perm_helper = $this->Application->recallObject('PermissionsHelper'); | $perm_helper = $this->Application->recallObject('PermissionsHelper'); | ||||
/* @var $perm_helper kPermissionsHelper */ | |||||
return $perm_helper->CheckEventPermission($event, $this->permMapping); | return $perm_helper->CheckEventPermission($event, $this->permMapping); | ||||
} | } | ||||
/** | /** | ||||
* Occurs, when config was parsed, allows to change config data dynamically | * Occurs, when config was parsed, allows to change config data dynamically | ||||
* | * | ||||
* @param kEvent $event | * @param kEvent $event | ||||
Show All 16 Lines | |||||
{ | { | ||||
$sql = 'SELECT SubscriberEmail, UserId | $sql = 'SELECT SubscriberEmail, UserId | ||||
FROM ' . $this->Application->getUnitOption('system-event-subscription', 'TableName') . ' | FROM ' . $this->Application->getUnitOption('system-event-subscription', 'TableName') . ' | ||||
WHERE (' . implode(') AND (', $event->getEventParam('where_clause')) . ')'; | WHERE (' . implode(') AND (', $event->getEventParam('where_clause')) . ')'; | ||||
$event->setEventParam('sql', $sql); | $event->setEventParam('sql', $sql); | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |