diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2014-08-27 14:37:10 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2014-08-27 14:37:52 +0200 |
commit | a873d934f56c3173fae671440094f71ee8eaf91d (patch) | |
tree | 624e5f4b02cd50ab05f1705fcc01f4285052b816 /index.php | |
parent | 35b39c8d7d2a994e6aa0d8e700d2c912d3483a85 (diff) |
Give precedence to plugin.* actions over custom tasks registered by plugins
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -295,13 +295,14 @@ if (is_file($incfile = INSTALL_PATH . 'program/steps/'.$RCMAIL->task.'/func.inc' $redirects = 0; $incstep = null; while ($redirects < 5) { // execute a plugin action - if ($RCMAIL->plugins->is_plugin_task($RCMAIL->task)) { - if (!$RCMAIL->action) $RCMAIL->action = 'index'; - $RCMAIL->plugins->exec_action($RCMAIL->task.'.'.$RCMAIL->action); + if (preg_match('/^plugin\./', $RCMAIL->action)) { + $RCMAIL->plugins->exec_action($RCMAIL->action); break; } - else if (preg_match('/^plugin\./', $RCMAIL->action)) { - $RCMAIL->plugins->exec_action($RCMAIL->action); + // execute action registered to a plugin task + else if ($RCMAIL->plugins->is_plugin_task($RCMAIL->task)) { + if (!$RCMAIL->action) $RCMAIL->action = 'index'; + $RCMAIL->plugins->exec_action($RCMAIL->task.'.'.$RCMAIL->action); break; } // try to include the step file |