From 370302171330854b9e25556779abcaf965e4e15c Mon Sep 17 00:00:00 2001 From: alecpl Date: Fri, 7 Oct 2011 10:25:23 +0000 Subject: - Plugin API: added 'ready' hook (#1488073) --- CHANGELOG | 1 + index.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 98a1222f8..c5c2c8cb7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Plugin API: added 'ready' hook (#1488073) - Ignore DSN request when it isn't supported by SMTP server (#1487800) - Make sure LDAP name fields aren't arrays (#1488108) - Fixed imap test to non-default port when using ssl (#1488118) diff --git a/index.php b/index.php index 6eee0bec5..a1eb54587 100644 --- a/index.php +++ b/index.php @@ -214,6 +214,12 @@ else { } } +// we're ready, user is authenticated and the request is safe +$plugin = $RCMAIL->plugins->exec_hook('ready', array('task' => $RCMAIL->task, 'action' => $RCMAIL->action)); +$RCMAIL->set_task($plugin['task']); +$RCMAIL->action = $plugin['action']; + + // handle special actions if ($RCMAIL->action == 'keep-alive') { $OUTPUT->reset(); -- cgit v1.2.3