[dev] IMP/Compose/Spellcheck JS error.
Chris Shepherd
cshepherd at s21c.net
Wed Jan 29 11:50:02 PST 2003
Hi all,
This morning I noticed there was a javascript error in the spell check page
that exists simply because the attachment javascript was included. Attached is
a patch to imp/compose.php that fixes this and generally just tidies up that
small code block.
--
Chris Shepherd
Network Administrator
S21C Technologies
-------------------------------------------------
This email may contain confidential information. Use of any such information
is strictly prohibited without express written consent of the sender
-------------- next part --------------
Index: compose.php
===================================================================
RCS file: /repository/imp/compose.php,v
retrieving revision 2.622
diff -u -r2.622 compose.php
--- compose.php 23 Jan 2003 16:13:55 -0000 2.622
+++ compose.php 29 Jan 2003 16:50:38 -0000
@@ -1035,22 +1035,25 @@
$timeout = ini_get('session.gc_maxlifetime');
$useHelp = ($conf['user']['online_help'] && $browser->hasFeature('javascript'));
-if (isset($actionID) && ($actionID == REDIRECT_COMPOSE)) {
- $mailbox = Horde::getFormData('thismailbox', $imp['mailbox']);
- require IMP_TEMPLATES . '/compose/redirect.inc';
-} else {
- if (isset($actionID) &&
- (($actionID == SPELL_CHECK) || ($actionID == SPELL_CHECK_FORWARD))) {
- require IMP_TEMPLATES . '/compose/spelling.inc';
- } else {
- require IMP_TEMPLATES . '/compose/compose.inc';
+if (isset($actionID)) {
+ switch ($actionID) {
+ case REDIRECT_COMPOSE:
+ $mailbox = Horde::getFormData('thismailbox', $imp['mailbox']);
+ require IMP_TEMPLATES . '/compose/redirect.inc';
+ break;
+ case SPELL_CHECK:
+ case SPELL_CHECK_FORWARD:
+ require IMP_TEMPLATES . '/compose/spelling.inc';
+ break;
+ default:
+ require IMP_TEMPLATES . '/compose/compose.inc';
+ require_once IMP_TEMPLATES . '/compose/compose.js';
+ /* Insert javascript code. */
+ if ($imp['file_upload']) {
+ require_once IMP_TEMPLATES . '/compose/attachments.js';
+ }
+ break;
}
-}
-
-/* Insert javascript code. */
-require_once IMP_TEMPLATES . '/compose/compose.js';
-if ($imp['file_upload']) {
- require_once IMP_TEMPLATES . '/compose/attachments.js';
}
/* Open the passphrase window here. */
More information about the dev
mailing list