From de14ec6aa0dd41f6d414da93bf83b52783e48632 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 04 May 2016 02:53:12 -0400
Subject: [PATCH] Merge branch 'for-1.3'

---
 index.php |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/index.php b/index.php
index a3066f4..e404c3b 100644
--- a/index.php
+++ b/index.php
@@ -1,8 +1,8 @@
 <?php
-/*
+/**
  +-------------------------------------------------------------------------+
  | Roundcube Webmail IMAP Client                                           |
- | Version 1.2-git                                                         |
+ | Version 1.3-git                                                         |
  |                                                                         |
  | Copyright (C) 2005-2015, The Roundcube Dev Team                         |
  |                                                                         |
@@ -40,7 +40,7 @@
 require_once 'program/include/iniset.php';
 
 // init application, start session, init output class, etc.
-$RCMAIL = rcmail::get_instance($GLOBALS['env']);
+$RCMAIL = rcmail::get_instance(0, $GLOBALS['env']);
 
 // Make the whole PHP output non-cacheable (#1487797)
 $RCMAIL->output->nocacheing_headers();
@@ -62,12 +62,12 @@
     rcmail::raise_error(array(
         'code' => 603,
         'type' => 'db',
-        'message' => $err_str), FALSE, TRUE);
+        'message' => $err_str), false, true);
 }
 
 // error steps
 if ($RCMAIL->action == 'error' && !empty($_GET['_code'])) {
-    rcmail::raise_error(array('code' => hexdec($_GET['_code'])), FALSE, TRUE);
+    rcmail::raise_error(array('code' => hexdec($_GET['_code'])), false, true);
 }
 
 // check if https is required (for login) and redirect if necessary
@@ -131,7 +131,7 @@
 
             // prevent redirect to compose with specified ID (#1488226)
             if ($query['_action'] == 'compose' && !empty($query['_id'])) {
-                $query = array();
+                $query = array('_action' => 'compose');
             }
         }
 
@@ -155,6 +155,7 @@
             RCMAIL::ERROR_COOKIES_DISABLED => 'cookiesdisabled',
             RCMAIL::ERROR_INVALID_REQUEST  => 'invalidrequest',
             RCMAIL::ERROR_INVALID_HOST     => 'invalidhost',
+            RCMAIL::ERROR_RATE_LIMIT       => 'accountlocked',
         );
 
         $error_message = !empty($auth['error']) && !is_numeric($auth['error']) ? $auth['error'] : ($error_labels[$error_code] ?: 'loginfailed');

--
Gitblit v1.9.1