Re-init plugins when changing to task

When roundcube initializes on a different task, plugins for just the
new task do not get initialized, and hence do not get executed when
the exec_hook call is made

One example is if check_auth fails, the login page will render,
but the plugins with 'login' task will not be fired
pull/7459/head
Varun Patil 4 years ago
parent 13a066b24f
commit aa44f54386

@ -161,6 +161,11 @@ class rcmail extends rcube
$task = asciiwords($task, true) ?: 'mail';
}
// Re-initialize plugins if task is changing
if (!empty($this->task) && $this->task != $task) {
$this->plugins->init($this, $task);
}
$this->task = $task;
$this->comm_path = $this->url(array('task' => $this->task));

Loading…
Cancel
Save