From 3b55b2f92b435630f56e63f5796471abacaaf425 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 23 Apr 2014 03:25:20 -0400
Subject: [PATCH] Fix so browser capabilities check is done really only once a session

---
 program/steps/mail/func.inc |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 027b2c1..10d30a5 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -83,6 +83,9 @@
   }
 }
 
+if (!empty($_SESSION['browser_caps']) && !$OUTPUT->ajax_call) {
+    $OUTPUT->set_env('browser_capabilities', $_SESSION['browser_caps']);
+}
 
 // set main env variables, labels and page title
 if (empty($RCMAIL->action) || $RCMAIL->action == 'list') {
@@ -135,10 +138,6 @@
     // set configuration
     $RCMAIL->set_env_config(array('delete_junk', 'flag_for_deletion', 'read_when_deleted',
         'skip_deleted', 'display_next', 'message_extwin', 'compose_extwin', 'forward_attachment'));
-
-    if (!empty($_SESSION['browser_caps'])) {
-        $OUTPUT->set_env('browser_capabilities', $_SESSION['browser_caps']);
-    }
 
     if (!$OUTPUT->ajax_call) {
         $OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash',

--
Gitblit v1.9.1