Changeset 90a6aff in github
- Timestamp:
- Sep 27, 2011 2:59:59 AM (20 months ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.7, release-0.8
- Children:
- 0c1cb2f
- Parents:
- 00d4242
- Location:
- program
- Files:
-
- 2 edited
-
js/common.js (modified) (1 diff)
-
steps/mail/compose.inc (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/js/common.js
r699a25a r90a6aff 618 618 } 619 619 else { 620 begin += 2; 621 } 622 623 var end = d ocument.cookie.indexOf(";", begin);620 begin += 2; 621 } 622 623 var end = dc.indexOf(";", begin); 624 624 if (end == -1) 625 625 end = dc.length; -
program/steps/mail/compose.inc
r609d392 r90a6aff 47 47 'mailbox' => $IMAP->get_mailbox_name(), 48 48 ); 49 49 50 50 // process values like "mailto:foo@bar.com?subject=new+message&cc=another" 51 51 if ($_SESSION['compose']['param']['to']) { … … 60 60 } 61 61 } 62 62 63 63 // select folder where to save the sent message 64 64 $_SESSION['compose']['param']['sent_mbox'] = $RCMAIL->config->get('sent_mbox'); 65 65 66 66 // pipe compose parameters thru plugins 67 67 $plugin = $RCMAIL->plugins->exec_hook('message_compose', $_SESSION['compose']); … … 85 85 ); 86 86 } 87 87 88 88 // save attachment if valid 89 89 if (($attachment['data'] && $attachment['name']) || ($attachment['path'] && file_exists($attachment['path']))) { 90 90 $attachment = rcmail::get_instance()->plugins->exec_hook('attachment_save', $attachment); 91 91 } 92 92 93 93 if ($attachment['status'] && !$attachment['abort']) { 94 94 unset($attachment['data'], $attachment['status'], $attachment['abort']); … … 243 243 } 244 244 else if (count($MESSAGE->identities)) { 245 $a_recipients = array(); 246 $a_names = array(); 247 245 248 // extract all recipients of the reply-message 246 $a_recipients = array();247 249 if (is_object($MESSAGE->headers) && in_array($compose_mode, array(RCUBE_COMPOSE_REPLY, RCUBE_COMPOSE_FORWARD))) 248 250 { 249 251 $a_to = $IMAP->decode_address_list($MESSAGE->headers->to); 250 252 foreach ($a_to as $addr) { 251 if (!empty($addr['mailto'])) 253 if (!empty($addr['mailto'])) { 252 254 $a_recipients[] = strtolower($addr['mailto']); 255 $a_names[] = $addr['name']; 256 } 253 257 } 254 258 … … 256 260 $a_cc = $IMAP->decode_address_list($MESSAGE->headers->cc); 257 261 foreach ($a_cc as $addr) { 258 if (!empty($addr['mailto'])) 262 if (!empty($addr['mailto'])) { 259 263 $a_recipients[] = strtolower($addr['mailto']); 264 $a_names[] = $addr['name']; 265 } 260 266 } 261 267 } … … 286 292 } 287 293 // use replied message recipients 288 else if (in_array($ident['email_ascii'], $a_recipients)) { 289 $from_idx = $idx; 294 else if (($found = array_search($ident['email_ascii'], $a_recipients)) !== false) { 295 // match identity name, prefer default identity 296 if ($from_idx === null || ($a_names[$found] && $ident['name'] && $a_names[$found] == $ident['name'])) { 297 $from_idx = $idx; 298 } 290 299 } 291 300 }
Note: See TracChangeset
for help on using the changeset viewer.
