diff options
author | thomascube <thomas@roundcube.net> | 2010-06-03 06:40:06 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2010-06-03 06:40:06 +0000 |
commit | 05a631a43c1950fc99f817cb50e4184dc0696663 (patch) | |
tree | 4aa36a428bdbbaae896772180741e970b8c7e6d2 /index.php | |
parent | ae8a2a5527672130b0da08817a6bd693bc77938b (diff) |
Allow plugins to register their own tasks
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -242,9 +242,13 @@ $redirects = 0; $incstep = null; while ($redirects < 5) { $stepfile = !empty($action_map[$RCMAIL->task][$RCMAIL->action]) ? $action_map[$RCMAIL->task][$RCMAIL->action] : strtr($RCMAIL->action, '-', '_') . '.inc'; - + // execute a plugin action - if (preg_match('/^plugin\./', $RCMAIL->action)) { + if ($RCMAIL->plugins->is_plugin_task($RCMAIL->task)) { + $RCMAIL->plugins->exec_action($RCMAIL->task.'.'.$RCMAIL->action); + break; + } + else if (preg_match('/^plugin\./', $RCMAIL->action)) { $RCMAIL->plugins->exec_action($RCMAIL->action); break; } |