Aleksander Machniak
2014-10-18 ced34cb15e095836767971aa4d27b141fb1d7ec9
index.php
@@ -147,7 +147,7 @@
            $error_code = RCMAIL::ERROR_INVALID_REQUEST;
        }
        else {
            $error_code = $auth['error'] ? $auth['error'] : $RCMAIL->login_error();
            $error_code = is_numeric($auth['error']) ? $auth['error'] : $RCMAIL->login_error();
        }
        $error_labels = array(
@@ -157,7 +157,7 @@
            RCMAIL::ERROR_INVALID_HOST     => 'invalidhost',
        );
        $error_message = $error_labels[$error_code] ? $error_labels[$error_code] : 'loginfailed';
        $error_message = !empty($auth['error']) && !is_numeric($auth['error']) ? $auth['error'] : ($error_labels[$error_code] ?: 'loginfailed');
        $OUTPUT->show_message($error_message, 'warning');
@@ -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