diff options
author | Varun Patil <radialapps@gmail.com> | 2020-07-02 20:04:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-02 20:04:34 +0300 |
commit | b4c6e1e0aed478e2a0834214d2a2a17c059405bd (patch) | |
tree | 5951af49a3ba2646c2db9995c47ef5e16edbb15a /program/include/rcmail.php | |
parent | 64c34410b3125b795c6501865d987e23903832c4 (diff) |
Re-init plugins when changing to task (#7459)
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
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r-- | program/include/rcmail.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 1122152b5..f9f7a0f77 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -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)); |