Changeset 2731 in subversion
- Timestamp:
- Jul 10, 2009 10:52:11 AM (4 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 2 edited
-
program/steps/mail/compose.inc (modified) (7 diffs)
-
skins/default/templates/compose.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/steps/mail/compose.inc
r2646 r2731 38 38 rcmail_compose_cleanup(); 39 39 $_SESSION['compose'] = array( 40 'id' => uniqid(rand()),41 'param' => array_map('strip_tags', $_GET),42 'mailbox' => $IMAP->get_mailbox_name() 40 'id' => uniqid(rand()), 41 'param' => array_map('strip_tags', $_GET), 42 'mailbox' => $IMAP->get_mailbox_name(), 43 43 ); 44 44 … … 87 87 // similar as in program/steps/mail/show.inc 88 88 // re-set 'prefer_html' to have possibility to use html part for compose 89 $CONFIG['prefer_html'] = $CONFIG['htmleditor'] ;89 $CONFIG['prefer_html'] = $CONFIG['htmleditor'] || $compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT; 90 90 $MESSAGE = new rcube_message($msg_uid); 91 91 … … 358 358 $attrib['name'] = '_message'; 359 359 360 if ($CONFIG['htmleditor'] )360 if ($CONFIG['htmleditor'] || (($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) && $MESSAGE->first_html_part())) 361 361 $isHtml = true; 362 362 else … … 563 563 Q($MESSAGE->headers->date), 564 564 htmlspecialchars(Q($MESSAGE->get_header('from'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset()), 565 htmlspecialchars(Q($MESSAGE->get_header('to'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset()));565 htmlspecialchars(Q($MESSAGE->get_header('to'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset())); 566 566 567 567 if ($MESSAGE->headers->replyto && $MESSAGE->headers->replyto != $MESSAGE->headers->from) 568 568 $prefix .= sprintf("<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">Reply-To: </th><td>%s</td></tr>", 569 htmlspecialchars(Q($MESSAGE->get_header('replyto'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset()));569 htmlspecialchars(Q($MESSAGE->get_header('replyto'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset())); 570 570 571 571 $prefix .= "</tbody></table><br>"; … … 584 584 * sizeof($MESSAGE->mime_parts can be 1 - e.g. attachment, but no text! 585 585 */ 586 if ( !isset($_SESSION['compose']['forward_attachments'])586 if (empty($_SESSION['compose']['forward_attachments']) 587 587 && is_array($MESSAGE->mime_parts) 588 588 && count($MESSAGE->mime_parts) > 0) … … 606 606 foreach ((array)$message->mime_parts as $pid => $part) 607 607 { 608 if (($part->ctype_primary != 'message' || !$bodyIsHtml) && $part-> filename &&609 ($part->disposition =='attachment' || ($part->disposition=='inline' && $bodyIsHtml) || (empty($part->disposition))))608 if (($part->ctype_primary != 'message' || !$bodyIsHtml) && $part->ctype_primary != 'multipart' && 609 ($part->disposition == 'attachment' || ($part->disposition == 'inline' && $bodyIsHtml) || $part->filename)) 610 610 { 611 611 if ($attachment = rcmail_save_attachment($message, $pid)) { 612 612 $_SESSION['compose']['attachments'][$attachment['id']] = $attachment; 613 if ($bodyIsHtml && $part-> filename && $part->content_id) {613 if ($bodyIsHtml && $part->content_id) { 614 614 $cid_map['cid:'.$part->content_id] = $OUTPUT->app->comm_path.'&_action=display-attachment&_file=rcmfile'.$attachment['id']; 615 615 } … … 646 646 647 647 $attachment = array( 648 'name' => $part->filename ,648 'name' => $part->filename ? $part->filename : 'Part_'.$pid.'.'.$part->ctype_secondary, 649 649 'mimetype' => $part->ctype_primary . '/' . $part->ctype_secondary, 650 650 'content_id' => $part->content_id, -
trunk/roundcubemail/skins/default/templates/compose.html
r2646 r2731 69 69 <td class="title"><roundcube:label name="editortype" /></td> 70 70 <td> 71 <div id="editor-select"><roundcube:object name="editorSelector" editorid="compose-body" tabindex="7"/></div>71 <div id="editor-select"><roundcube:object name="editorSelector" editorid="compose-body" /></div> 72 72 <div id="spellcheck-control"></div> 73 73 </td> … … 77 77 </div> 78 78 <div id="compose-div"> 79 <roundcube:object name="composeBody" id="compose-body" form="form" cols="70" rows="20" tabindex=" 8" />79 <roundcube:object name="composeBody" id="compose-body" form="form" cols="70" rows="20" tabindex="7" /> 80 80 <table border="0" cellspacing="0" summary="" style="width:100%; margin-top: 5px;"><tbody> 81 81 <tr>
Note: See TracChangeset
for help on using the changeset viewer.
