From 05a631a43c1950fc99f817cb50e4184dc0696663 Mon Sep 17 00:00:00 2001 From: thomascube Date: Thu, 3 Jun 2010 06:40:06 +0000 Subject: Allow plugins to register their own tasks --- index.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 43cf7c413..a226b54c9 100644 --- a/index.php +++ b/index.php @@ -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; } -- cgit v1.2.3