Thomas Bruederli
2014-08-27 a873d934f56c3173fae671440094f71ee8eaf91d
Give precedence to plugin.* actions over custom tasks registered by plugins
1 files modified
11 ■■■■ changed files
index.php 11 ●●●● patch | view | raw | blame | history
index.php
@@ -295,13 +295,14 @@
$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