From 242d3c520bfe1db8feaeb5a23370be0c6b530739 Mon Sep 17 00:00:00 2001
From: corbosman <cor@xs4all.net>
Date: Mon, 22 Dec 2014 05:23:05 -0500
Subject: [PATCH] fix uupart handling

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

diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index f0afc6b..350b54f 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -145,8 +145,13 @@
         $this->task      = $task;
         $this->comm_path = $this->url(array('task' => $this->task));
 
+        if (!empty($_REQUEST['_framed'])) {
+            $this->comm_path .= '&_framed=1';
+        }
+
         if ($this->output) {
             $this->output->set_env('task', $this->task);
+            $this->output->set_env('comm_path', $this->comm_path);
         }
     }
 
@@ -429,6 +434,9 @@
         if ($this->user && $this->user->ID) {
             $this->output->set_env('user_id', $this->user->get_hash());
         }
+
+        // set compose mode for all tasks (message compose step can be triggered from everywhere)
+        $this->output->set_env('compose_extwin', $this->config->get('compose_extwin',false));
 
         // add some basic labels to client
         $this->output->add_label('loading', 'servererror', 'connerror', 'requesttimedout', 'refreshing');
@@ -1334,7 +1342,8 @@
      */
     public function folder_selector($p = array())
     {
-        $p += array('maxlength' => 100, 'realnames' => false, 'is_escaped' => true);
+        $realnames = $this->config->get('show_real_foldernames');
+        $p += array('maxlength' => 100, 'realnames' => $realnames, 'is_escaped' => true);
         $a_mailboxes = array();
         $storage = $this->get_storage();
 
@@ -1797,17 +1806,17 @@
             $lang = 'en';
         }
 
-        $script = json_encode(array(
+        $script = array(
             'mode'       => $mode,
             'lang'       => $lang,
             'skin_path'  => $this->output->get_skin_path(),
             'spellcheck' => intval($this->config->get('enable_spellcheck')),
             'spelldict'  => intval($this->config->get('spellcheck_dictionary'))
-        ));
+        );
 
         $this->output->include_script('tiny_mce/tiny_mce.js');
         $this->output->include_script('editor.js');
-        $this->output->add_script("rcmail_editor_init($script)", 'docready');
+        $this->output->set_env('html_editor_init', $script);
     }
 
     /**

--
Gitblit v1.9.1