Changeset View
Changeset View
Standalone View
Standalone View
core/units/groups/groups_event_handler.php
Show All 22 Lines | |||||
* @return void | * @return void | ||||
* @access protected | * @access protected | ||||
* @see kDBEventHandler::OnListBuild() | * @see kDBEventHandler::OnListBuild() | ||||
*/ | */ | ||||
protected function SetCustomQuery(kEvent $event) | protected function SetCustomQuery(kEvent $event) | ||||
{ | { | ||||
parent::SetCustomQuery($event); | parent::SetCustomQuery($event); | ||||
/** @var kDBList $object */ | |||||
$object = $event->getObject(); | $object = $event->getObject(); | ||||
/* @var $object kDBList */ | |||||
switch ($event->Special) { | switch ($event->Special) { | ||||
case 'user': | case 'user': | ||||
$user_id = $this->Application->GetVar('u_id'); | $user_id = $this->Application->GetVar('u_id'); | ||||
if ( $user_id !== false ) { | if ( $user_id !== false ) { | ||||
// show only groups, that user doesn't belong to | // show only groups, that user doesn't belong to | ||||
$table_name = $this->Application->GetTempName(TABLE_PREFIX . 'UserGroupRelations', 'prefix:u'); | $table_name = $this->Application->GetTempName(TABLE_PREFIX . 'UserGroupRelations', 'prefix:u'); | ||||
Show All 22 Lines | |||||
*/ | */ | ||||
protected function OnSave(kEvent $event) | protected function OnSave(kEvent $event) | ||||
{ | { | ||||
parent::OnSave($event); | parent::OnSave($event); | ||||
$this->Application->StoreVar('refresh_tree', 1); | $this->Application->StoreVar('refresh_tree', 1); | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |