From bc8437b71c440a605497a6af363811351b1aa147 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Sun, 01 Jan 2012 14:10:53 -0500
Subject: [PATCH] - Fix so editor selector is hidden when 'htmleditor' is listed in 'dont_override'

---
 CHANGELOG                            |    1 +
 program/steps/mail/compose.inc       |   12 +++++-------
 skins/default/templates/compose.html |    2 ++
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 02a45ff..1054db0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
+- Fix so editor selector is hidden when 'htmleditor' is listed in 'dont_override'
 - Fix wrong (long) label usage (#1488283)
 - Fix handling of INBOX's subfolders in special folders config (#1488279)
 - Add ifModule statement for setting Options -Indexes in .htaccess file (#1488274)
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 7172960..d09b920 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -1238,7 +1238,7 @@
             'title' => rcube_label('delete'),
             'onclick' => sprintf("return %s.command('remove-attachment','rcmfile%s', this)", JS_OBJECT_NAME, $id)),
           $button) . Q($a_prop['name']));
-        
+
         $jslist['rcmfile'.$id] = array('name' => $a_prop['name'], 'complete' => true, 'mimetype' => $a_prop['mimetype']);
     }
   }
@@ -1252,14 +1252,14 @@
 
   $OUTPUT->set_env('attachments', $jslist);
   $OUTPUT->add_gui_object('attachmentlist', $attrib['id']);
-    
+
   return html::tag('ul', $attrib, $out, html::$common_attrib);
 }
 
 
 function rcmail_compose_attachment_form($attrib)
 {
-  global $RCMAIL, $OUTPUT;
+  global $OUTPUT;
 
   // add ID if not given
   if (!$attrib['id'])
@@ -1300,7 +1300,7 @@
 function rcmail_priority_selector($attrib)
 {
   global $MESSAGE;
-  
+
   list($form_start, $form_end) = get_form_tags($attrib);
   unset($attrib['form']);
 
@@ -1337,7 +1337,7 @@
   unset($attrib['form']);
 
   if (!isset($attrib['id']))
-    $attrib['id'] = 'receipt';  
+    $attrib['id'] = 'receipt';
 
   $attrib['name'] = '_receipt';
   $attrib['value'] = '1';
@@ -1380,8 +1380,6 @@
 
 function rcmail_editor_selector($attrib)
 {
-  global $CONFIG, $MESSAGE, $compose_mode;
-
   // determine whether HTML or plain text should be checked
   $useHtml = rcmail_compose_editor_mode();
 
diff --git a/skins/default/templates/compose.html b/skins/default/templates/compose.html
index 2dcf8b0..4921bbf 100644
--- a/skins/default/templates/compose.html
+++ b/skins/default/templates/compose.html
@@ -112,10 +112,12 @@
             </div>
             <div id="compose-editorfooter">
                 <span id="spellcheck-control" style="margin-right:10px"></span>
+                <roundcube:if condition="!in_array('htmleditor', (array)config:dont_override)" />
                 <span>
                     <label><roundcube:label name="editortype" /></label>
                     <roundcube:object name="editorSelector" editorid="compose-body" tabindex="12" />
                 </span>
+                <roundcube:endif />
             </div>
         </div>
     </div>

--
Gitblit v1.9.1