diff options
author | corbosman <cor@xs4all.net> | 2015-01-06 21:48:39 +0100 |
---|---|---|
committer | corbosman <cor@xs4all.net> | 2015-02-04 13:17:51 +0100 |
commit | de89d46be24f6b3454a0c0e62973af947b22ff29 (patch) | |
tree | ba1faa661c200a91c281b80614b2745fc79f8b83 /program/include | |
parent | fe653e312206f57b0937193d8f7be46518a619d2 (diff) |
Load plugins before sessions have started
Move the plugin loading phase to before sessions have started allowing plugins to add session drivers. Plugins that want to use this should define an "onload" method in their plugins. This method does not have access to variables like $task as they are not yet initialised at that time.
Diffstat (limited to 'program/include')
-rw-r--r-- | program/include/rcmail.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php index a16319f72..306e5938a 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -93,6 +93,10 @@ class rcmail extends rcube $this->filename = $basename; } + // load all configured plugins + $this->plugins->load_plugins((array)$this->config->get('plugins', array()), + array('filesystem_attachments', 'jqueryui')); + // start session $this->session_init(); @@ -124,10 +128,8 @@ class rcmail extends rcube $GLOBALS['OUTPUT'] = $this->load_gui(!empty($_REQUEST['_framed'])); } - // load plugins + // run init method on all the plugins $this->plugins->init($this, $this->task); - $this->plugins->load_plugins((array)$this->config->get('plugins', array()), - array('filesystem_attachments', 'jqueryui')); } /** |