From fc84ca1f0cd4684697adecb406fcb5c347d91807 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sat, 30 Jun 2012 03:50:39 -0400
Subject: [PATCH] Decorated select width fix is also needed for IE and Safari

---
 program/include/rcmail.php |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 8988bdc..66e9a5c 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -556,7 +556,7 @@
     $this->output->set_charset(RCMAIL_CHARSET);
 
     // add some basic labels to client
-    $this->output->add_label('loading', 'servererror');
+    $this->output->add_label('loading', 'servererror', 'requesttimedout');
 
     return $this->output;
   }
@@ -1017,15 +1017,16 @@
 
     if (is_array($default_host)) {
       $post_host = get_input_value('_host', RCUBE_INPUT_POST);
+      $post_user = get_input_value('_user', RCUBE_INPUT_POST);
+
+      list($user, $domain) = explode('@', $post_user);
 
       // direct match in default_host array
-      if ($default_host[$post_host] || in_array($post_host, array_values($default_host))) {
+      if ($default_host[$post_host] || in_array($post_host, $default_host)) {
         $host = $post_host;
       }
-
       // try to select host by mail domain
-      list($user, $domain) = explode('@', get_input_value('_user', RCUBE_INPUT_POST));
-      if (!empty($domain)) {
+      else if (!empty($domain)) {
         foreach ($default_host as $storage_host => $mail_domains) {
           if (is_array($mail_domains) && in_array_nocase($domain, $mail_domains)) {
             $host = $storage_host;
@@ -1167,7 +1168,7 @@
         $this->texts = array_merge($this->texts, $messages);
 
       // include user language files
-      if ($lang != 'en' && is_dir(INSTALL_PATH . 'program/localization/' . $lang)) {
+      if ($lang != 'en' && $lang != 'en_US' && is_dir(INSTALL_PATH . 'program/localization/' . $lang)) {
         include_once(INSTALL_PATH . 'program/localization/' . $lang . '/labels.inc');
         include_once(INSTALL_PATH . 'program/localization/' . $lang . '/messages.inc');
 

--
Gitblit v1.9.1