Ignore:
Timestamp:
Jun 11, 2009 2:07:35 PM (4 years ago)
Author:
alec
Message:
File:
1 edited

Legend:

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

    r2627 r2639  
    2424define('RCUBE_COMPOSE_FORWARD', 0x0107); 
    2525define('RCUBE_COMPOSE_DRAFT', 0x0108); 
     26define('RCUBE_COMPOSE_EDIT', 0x0109); 
    2627 
    2728$MESSAGE_FORM = NULL; 
     
    7576else if ($msg_uid = $_SESSION['compose']['param']['_forward_uid']) 
    7677  $compose_mode = RCUBE_COMPOSE_FORWARD; 
     78else if ($msg_uid = $_SESSION['compose']['param']['_uid']) 
     79  $compose_mode = RCUBE_COMPOSE_EDIT; 
    7780else if ($msg_uid = $_SESSION['compose']['param']['_draft_uid']) { 
    7881  $RCMAIL->imap->set_mailbox($CONFIG['drafts_mbox']); 
     
    169172  else if ($fname && !$fvalue && !empty($_SESSION['compose']['param'][$fname])) 
    170173    $fvalue = $_SESSION['compose']['param'][$fname]; 
    171  
    172174  else if ($header && $compose_mode == RCUBE_COMPOSE_REPLY) 
    173175  { 
     
    209211    } 
    210212  } 
    211   else if ($header && $compose_mode == RCUBE_COMPOSE_DRAFT) 
     213  else if ($header && in_array($compose_mode, array(RCUBE_COMPOSE_DRAFT, RCUBE_COMPOSE_EDIT))) 
    212214  { 
    213215    // get drafted headers 
     
    386388      $body = rcmail_create_forward_body($body, $isHtml); 
    387389    // load draft message body 
    388     else if ($compose_mode == RCUBE_COMPOSE_DRAFT) 
     390    else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) 
    389391      $body = rcmail_create_draft_body($body, $isHtml); 
    390392  } 
     
    690692  } 
    691693  // creeate a draft-subject 
    692   else if ($compose_mode == RCUBE_COMPOSE_DRAFT) { 
     694  else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) { 
    693695    $subject = $MESSAGE->subject; 
    694696  } 
     
    829831 
    830832  $out = $form_start ? "$form_start\n" : ''; 
    831   $out .= $checkbox->show( 
    832     $compose_mode == RCUBE_COMPOSE_DRAFT && $MESSAGE->headers->mdn_to ? 1 : 0); 
     833  $out .= $checkbox->show(in_array($compose_mode, array(RCUBE_COMPOSE_DRAFT, RCUBE_COMPOSE_EDIT)) 
     834        && $MESSAGE->headers->mdn_to ? 1 : 0); 
    833835  $out .= $form_end ? "\n$form_end" : ''; 
    834836 
Note: See TracChangeset for help on using the changeset viewer.