Changeset View
Changeset View
Standalone View
Standalone View
plugins/kolab_delegation/kolab_delegation.php
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | public function init() | ||||
// on-message-send delegation support | // on-message-send delegation support | ||||
$this->add_hook('message_before_send', array($this, 'message_before_send')); | $this->add_hook('message_before_send', array($this, 'message_before_send')); | ||||
// delegation support in Calendar plugin | // delegation support in Calendar plugin | ||||
$this->add_hook('message_load', array($this, 'message_load')); | $this->add_hook('message_load', array($this, 'message_load')); | ||||
$this->add_hook('calendar_user_emails', array($this, 'calendar_user_emails')); | $this->add_hook('calendar_user_emails', array($this, 'calendar_user_emails')); | ||||
$this->add_hook('calendar_list_filter', array($this, 'calendar_list_filter')); | $this->add_hook('calendar_list_filter', array($this, 'calendar_list_filter')); | ||||
$this->add_hook('calendar_load_itip', array($this, 'calendar_load_itip')); | $this->add_hook('calendar_load_itip', array($this, 'calendar_load_itip')); | ||||
$this->add_hook('calendar_event_find', array($this, 'calendar_event_find')); | |||||
// delegation support in kolab_auth plugin | // delegation support in kolab_auth plugin | ||||
$this->add_hook('kolab_auth_emails', array($this, 'kolab_auth_emails')); | $this->add_hook('kolab_auth_emails', array($this, 'kolab_auth_emails')); | ||||
if ($this->rc->task == 'settings') { | if ($this->rc->task == 'settings') { | ||||
// delegation management interface | // delegation management interface | ||||
$this->register_action('plugin.delegation', array($this, 'controller_ui')); | $this->register_action('plugin.delegation', array($this, 'controller_ui')); | ||||
$this->register_action('plugin.delegation-delete', array($this, 'controller_action')); | $this->register_action('plugin.delegation-delete', array($this, 'controller_action')); | ||||
▲ Show 20 Lines • Show All 190 Lines • ▼ Show 20 Lines | public function calendar_load_itip($args) | ||||
$engine = $this->engine(); | $engine = $this->engine(); | ||||
$engine->delegator_identity_filter($args); | $engine->delegator_identity_filter($args); | ||||
} | } | ||||
return $args; | return $args; | ||||
} | } | ||||
/** | /** | ||||
* calendar::find_event() handler | |||||
*/ | |||||
public function calendar_event_find($args) | |||||
{ | |||||
// If the event can't be found in user personal folders, we'll | |||||
// look in delegators' folders (T1264) | |||||
if (!empty($_SESSION['delegators']) && empty($args['result'])) { | |||||
$engine = $this->engine(); | |||||
$engine->delegator_find_event($args); | |||||
} | |||||
return $args; | |||||
} | |||||
/** | |||||
* Delegation support in Calendar plugin UI | * Delegation support in Calendar plugin UI | ||||
*/ | */ | ||||
public function calendar_ui() | public function calendar_ui() | ||||
{ | { | ||||
// Initialize handling of delegators' identities in event form | // Initialize handling of delegators' identities in event form | ||||
if (!empty($_SESSION['delegators'])) { | if (!empty($_SESSION['delegators'])) { | ||||
$engine = $this->engine(); | $engine = $this->engine(); | ||||
▲ Show 20 Lines • Show All 279 Lines • Show Last 20 Lines |