From 2727053c61cac4a37a76b9e58e607acff7fc8dfb Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 07 Oct 2008 02:24:18 -0400
Subject: [PATCH] - #1485471: fix drafts saving

---
 program/steps/mail/compose.inc |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 9fe4a68..0be6f0c 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -83,8 +83,11 @@
 // add some labels to client
 $OUTPUT->add_label('nosubject', 'nosenderwarning', 'norecipientwarning', 'nosubjectwarning', 'nobodywarning', 'notsentwarning', 'savingmessage', 'sendingmessage', 'messagesaved', 'converting');
 
-// add config parameter to client script
-$OUTPUT->set_env('draft_autosave', !empty($CONFIG['drafts_mbox']) ? $CONFIG['draft_autosave'] : 0);
+// add config parameters to client script
+if (!empty($CONFIG['drafts_mbox'])) {
+  $OUTPUT->set_env('drafts_mailbox', $CONFIG['drafts_mbox']);
+  $OUTPUT->set_env('draft_autosave', $CONFIG['draft_autosave']);
+}
 // set current mailbox in client environment
 $OUTPUT->set_env('mailbox', $IMAP->get_mailbox_name());
 

--
Gitblit v1.9.1