From b93d00026aefbdccfabd6253f9cb184956617084 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Mon, 07 Jun 2010 06:03:59 -0400
Subject: [PATCH] - fix for initial capability response

---
 index.php |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/index.php b/index.php
index d3cf06f..a226b54 100644
--- a/index.php
+++ b/index.php
@@ -103,12 +103,7 @@
     $RCMAIL->authenticate_session();
 
     // log successful login
-    if ($RCMAIL->config->get('log_logins')) {
-      write_log('userlogins', sprintf('Successful login for %s (id %d) from %s',
-        $RCMAIL->user->get_username(),
-        $RCMAIL->user->ID,
-        $_SERVER['REMOTE_ADDR']));
-    }
+    rcmail_log_login();
 
     // restore original request parameters
     $query = array();
@@ -247,9 +242,13 @@
 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;
   }

--
Gitblit v1.9.1