Changeset eeb85f4 in github


Ignore:
Timestamp:
Nov 2, 2010 10:53:54 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
f75f65c
Parents:
a5e8e5d
Message:
  • Add option to place replies in the folder of the message being replied to (#1485945)
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r6f09681 reeb85f4  
    6060- Improve performance of message cache status checking with skip_disabled=true 
    6161- Support contact's email addresses up to 255 characters long (#1487095) 
     62- Add option to place replies in the folder of the message being replied to (#1485945) 
    6263 
    6364RELEASE 0.4.2 
  • config/main.inc.php.dist

    r4dd4172 reeb85f4  
    590590$rcmail_config['dsn_default'] = 0; 
    591591 
     592// Place replies in the folder of the message being replied to 
     593$rcmail_config['reply_same_folder'] = false; 
     594 
    592595// end of config file 
  • program/localization/en_US/labels.inc

    rcb7d32e reeb85f4  
    379379$labels['reqmdn'] = 'Always request a return receipt'; 
    380380$labels['reqdsn'] = 'Always request a delivery status notification'; 
     381$labels['replysamefolder'] = 'Place replies in the folder of the message being replied to'; 
    381382 
    382383$labels['folder']  = 'Folder'; 
  • program/localization/pl_PL/labels.inc

    r4438d667 reeb85f4  
    415415$labels['reqdsn'] = 'Zawsze ŌĠ
    416416daj statusu dostarczenia (DSN)'; 
     417$labels['replysamefolder'] = 'Umieszczaj odpowiedzi w folderze wiadomości, na którÄ 
     418 odpowiadam'; 
     419$labels['contactproperties'] = 'Właściwości'; 
    417420 
    418421?> 
  • program/steps/mail/compose.inc

    rbde4219 reeb85f4  
    101101 
    102102  // check if folder for saving sent messages exists and is subscribed (#1486802) 
    103   if (($sent_folder = $_SESSION['compose']['param']['sent_mbox']) && !$IMAP->mailbox_exists($sent_folder, true)) { 
    104     // folder may exist but isn't subscribed (#1485241) 
    105     if (!$IMAP->mailbox_exists($sent_folder)) 
    106       $IMAP->create_mailbox($sent_folder, true); 
    107     else 
    108       $IMAP->subscribe($sent_folder); 
     103  if ($sent_folder = $_SESSION['compose']['param']['sent_mbox']) { 
     104    rcmail_check_sent_folder($sent_folder, true); 
    109105  } 
    110106 
     
    178174 
    179175    $OUTPUT->set_env('compose_mode', 'reply'); 
     176 
     177    // Save the sent message in the same folder of the message being replied to 
     178    if ($RCMAIL->config->get('reply_same_folder') && ($sent_folder = $_SESSION['compose']['mailbox']) 
     179      && rcmail_check_sent_folder($sent_folder, false) 
     180    ) { 
     181      $_SESSION['compose']['param']['sent_mbox'] = $sent_folder; 
     182    } 
    180183  } 
    181184  else if ($compose_mode == RCUBE_COMPOSE_DRAFT) 
     
    192195 
    193196      $_SESSION['compose']['mailbox'] = $info['folder']; 
    194     } 
    195      
     197 
     198      // Save the sent message in the same folder of the message being replied to 
     199      if ($RCMAIL->config->get('reply_same_folder') && ($sent_folder = $info['folder']) 
     200        && rcmail_check_sent_folder($sent_folder, false) 
     201      ) { 
     202        $_SESSION['compose']['param']['sent_mbox'] = $sent_folder; 
     203      } 
     204    } 
     205 
    196206    if ($MESSAGE->headers->in_reply_to) 
    197207      $_SESSION['compose']['reply_msgid'] = '<'.$MESSAGE->headers->in_reply_to.'>'; 
     
    12621272 
    12631273 
     1274function rcmail_check_sent_folder($folder, $create=false) 
     1275{ 
     1276  global $IMAP; 
     1277 
     1278  if ($IMAP->mailbox_exists($folder, true)) { 
     1279    return true; 
     1280  } 
     1281 
     1282  // folder may exist but isn't subscribed (#1485241) 
     1283  if ($create) { 
     1284    if (!$IMAP->mailbox_exists($folder)) 
     1285      return $IMAP->create_mailbox($folder, true); 
     1286    else 
     1287      return $IMAP->subscribe($folder); 
     1288  } 
     1289 
     1290  return false; 
     1291} 
     1292 
     1293 
    12641294function get_form_tags($attrib) 
    12651295{ 
     
    12751305    $form_start .= $hiddenfields->show(); 
    12761306  } 
    1277      
     1307 
    12781308  $form_end = ($MESSAGE_FORM && !strlen($attrib['form'])) ? '</form>' : ''; 
    12791309  $form_name = !empty($attrib['form']) ? $attrib['form'] : 'form'; 
    1280    
     1310 
    12811311  if (!$MESSAGE_FORM) 
    12821312    $RCMAIL->output->add_gui_object('messageform', $form_name); 
    1283    
     1313 
    12841314  $MESSAGE_FORM = $form_name; 
    12851315 
  • program/steps/settings/func.inc

    rf22ea7b reeb85f4  
    535535    } 
    536536 
     537    if (!isset($no_override['reply_same_folder'])) { 
     538      $field_id = 'rcmfd_reply_same_folder'; 
     539      $input_reply_same_folder = new html_checkbox(array('name' => '_reply_same_folder', 'id' => $field_id, 'value' => 1)); 
     540 
     541      $blocks['main']['options']['reply_same_folder'] = array( 
     542        'title' => html::label($field_id, Q(rcube_label('replysamefolder'))), 
     543        'content' => $input_reply_same_folder->show($config['reply_same_folder']?1:0), 
     544      ); 
     545    } 
     546 
    537547    if (!isset($no_override['top_posting'])) { 
    538548      $field_id = 'rcmfd_top_posting'; 
  • program/steps/settings/save_prefs.inc

    rf22ea7b reeb85f4  
    6868      'mdn_default'        => isset($_POST['_mdn_default']) ? TRUE : FALSE, 
    6969      'dsn_default'        => isset($_POST['_dsn_default']) ? TRUE : FALSE, 
     70      'reply_same_folder'  => isset($_POST['_reply_same_folder']) ? TRUE : FALSE, 
    7071      'show_sig'           => isset($_POST['_show_sig']) ? intval($_POST['_show_sig']) : 1, 
    7172      'top_posting'        => !empty($_POST['_top_posting']), 
Note: See TracChangeset for help on using the changeset viewer.