Changeset bc404ff in github for program/steps/mail/compose.inc


Ignore:
Timestamp:
Mar 11, 2010 5:44:43 PM (3 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
7244b45
Parents:
56505a1
Message:

Save draft information in one header; finally fixes #1486203

File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/steps/mail/compose.inc

    ra4cf457 rbc404ff  
    152152    if (!empty($_SESSION['compose']['param']['all'])) 
    153153      $MESSAGE->reply_all = 1; 
    154        
     154 
    155155    $OUTPUT->set_env('compose_mode', 'reply'); 
    156156  } 
    157157  else if ($compose_mode == RCUBE_COMPOSE_DRAFT) 
    158158  { 
    159     if($MESSAGE->headers->in_reply_to) 
     159    if ($MESSAGE->headers->others['x-draft-info']) 
    160160    { 
    161161      // get reply_uid/forward_uid to flag the original message when sending 
    162       $_SESSION['compose']['reply_uid'] = $MESSAGE->headers->others['x-reply-uid']; 
    163       $_SESSION['compose']['forward_uid'] = $MESSAGE->headers->others['x-forward-uid']; 
     162      $info = rcmail_draftinfo_decode($MESSAGE->headers->others['x-draft-info']); 
     163 
     164      if ($info['type'] == 'reply') 
     165        $_SESSION['compose']['reply_uid'] = $info['uid']; 
     166      else if ($info['type'] == 'forward') 
     167        $_SESSION['compose']['forward_uid'] = $info['uid']; 
     168 
     169      $_SESSION['compose']['mailbox'] = $info['folder']; 
     170    } 
     171     
     172    if ($MESSAGE->headers->in_reply_to) 
    164173      $_SESSION['compose']['reply_msgid'] = '<'.$MESSAGE->headers->in_reply_to.'>'; 
    165     } 
     174 
    166175    $_SESSION['compose']['references']  = $MESSAGE->headers->references; 
    167176  } 
Note: See TracChangeset for help on using the changeset viewer.