thomascube
2006-06-26 b068a07db2c519cde6bf1715e725cb70f2bbbc35
Typos, Optimizations, Updates

10 files modified
100 ■■■■■ changed files
CHANGELOG 10 ●●●●● patch | view | raw | blame | history
UPGRADING 22 ●●●●● patch | view | raw | blame | history
program/include/main.inc 2 ●●● patch | view | raw | blame | history
program/include/rcube_imap.inc 2 ●●● patch | view | raw | blame | history
program/include/rcube_smtp.inc 2 ●●● patch | view | raw | blame | history
program/localization/de_CH/labels.inc 3 ●●●● patch | view | raw | blame | history
program/localization/de_CH/messages.inc 4 ●●●● patch | view | raw | blame | history
program/localization/de_DE/labels.inc 3 ●●●● patch | view | raw | blame | history
program/localization/de_DE/messages.inc 4 ●●●● patch | view | raw | blame | history
program/steps/mail/sendmail.inc 48 ●●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,10 +1,20 @@
CHANGELOG RoundCube Webmail
---------------------------
2006/06/25
----------
- Changed behavior to include host-specific configuration (Bug #1483849)
- Assume ISO-8859-1 encoding of mail messages by default (Patch #1483839)
- Fixed spell checker to work with the new URL at google.com
- Some memory and security optimizations sendmail.inc
- Updated UGRADING description
2006/06/19
----------
- Added Drafts support (Feature #1326839) (richs)
2006/06/02
----------
- Updated Estonian localization and moved from ee to et
UPGRADING
@@ -71,6 +71,10 @@
  $rcmail_config['log_dir'] = 'logs/';
  $rcmail_config['temp_dir'] = 'temp/';
  $rcmail_config['message_cache_lifetime'] = '10d';
  $rcmail_config['drafts_mbox'] = 'Drafts';
  $rcmail_config['product_name'] = 'RoundCube Webmail';
  $rcmail_config['read_when_deleted'] = TRUE;
  $rcmail_config['enable_spellcheck'] = TRUE;
- add these lines to /config/db.inc.php
  $rcmail_config['db_max_length'] = 512000;  
  $rcmail_config['db_sequence_user_ids'] = 'user_ids';
@@ -78,7 +82,7 @@
  $rcmail_config['db_sequence_contact_ids'] = 'contact_ids';
  $rcmail_config['db_sequence_cache_ids'] = 'cache_ids';
  $rcmail_config['db_sequence_message_ids'] = 'message_ids';  
  $rcmail_config['db_persistent'] = TRUE;
from version 0.1-20051021
----------------------------------------
@@ -93,6 +97,10 @@
  $rcmail_config['log_dir'] = 'logs/';
  $rcmail_config['temp_dir'] = 'temp/';
  $rcmail_config['message_cache_lifetime'] = '10d';
  $rcmail_config['drafts_mbox'] = 'Drafts';
  $rcmail_config['product_name'] = 'RoundCube Webmail';
  $rcmail_config['read_when_deleted'] = TRUE;
  $rcmail_config['enable_spellcheck'] = TRUE;
- add these lines to /config/db.inc.php
  $rcmail_config['db_max_length'] = 512000;
  $rcmail_config['db_sequence_user_ids'] = 'user_ids';
@@ -100,6 +108,7 @@
  $rcmail_config['db_sequence_contact_ids'] = 'contact_ids';
  $rcmail_config['db_sequence_cache_ids'] = 'cache_ids';
  $rcmail_config['db_sequence_message_ids'] = 'message_ids';
  $rcmail_config['db_persistent'] = TRUE;
  
  
form version 0.1-beta
@@ -109,5 +118,14 @@
- replace all files in folder /skins/default/
- add these lines to /config/db.inc.php
  $rcmail_config['db_persistent'] = TRUE;
- add these lines to /config/main.inc.php
  $rcmail_config['drafts_mbox'] = 'Drafts';
  $rcmail_config['product_name'] = 'RoundCube Webmail';
  $rcmail_config['read_when_deleted'] = TRUE;
  $rcmail_config['enable_spellcheck'] = TRUE;
- replace the following line from /config/main.inc.php
   @include($_SERVER['HTTP_HOST'].'.inc.php');
  with
   $rcmail_config['include_host_config'] = TRUE;
  
program/include/main.inc
@@ -44,7 +44,7 @@
  $CONFIG = is_array($rcmail_config) ? $rcmail_config : array();
  
  // load host-specific configuration
  rcmail_load_host_config(&$CONFIG);
  rcmail_load_host_config($CONFIG);
  
  $CONFIG['skin_path'] = $CONFIG['skin_path'] ? preg_replace('/\/$/', '', $CONFIG['skin_path']) : 'skins/default';
program/include/rcube_imap.inc
@@ -990,7 +990,7 @@
  // append a mail message (source) to a specific mailbox
  function save_message($mbox_name, $message)
  function save_message($mbox_name, &$message)
    {
    $mailbox = $this->_mod_mailbox($mbox_name);
program/include/rcube_smtp.inc
@@ -49,7 +49,7 @@
 * @return bool  Returns TRUE on success, or FALSE on error
 * @access public
 */
function smtp_mail($from, $recipients, $headers, &$body)
function smtp_mail($from, $recipients, &$headers, &$body)
  {
  global $SMTP_CONN, $CONFIG, $SMTP_ERROR;
  $smtp_timeout = null;
program/localization/de_CH/labels.inc
@@ -37,7 +37,6 @@
$labels['drafts'] = 'Entwürfe';
$labels['sent']   = 'Gesendet';
$labels['trash']  = 'Gelöscht';
$labels['drafts'] = 'Vorlagen';
$labels['junk']   = 'Junk';
// message listing // Nachrichtenliste
@@ -121,7 +120,7 @@
// message compose // Nachrichten erstellen
$labels['compose']  = 'Neue Nachricht verfassen';
$labels['savemessage']  = 'Außer diesem Entwurf';
$labels['savemessage']  = 'Nachricht speichern';
$labels['sendmessage']  = 'Nachricht jetzt senden';
$labels['addattachment']  = 'Datei anfügen';
$labels['charset']  = 'Zeichensatz';
program/localization/de_CH/messages.inc
@@ -38,9 +38,9 @@
$messages['messagesent'] = 'Nachricht erfolgreich gesendet';
$messages['savingmessage'] = 'Einsparunganzeige...';
$messages['savingmessage'] = 'Nachricht wird gespeichert...';
$messages['messagesaved'] = 'Anzeige gespeichert zu den Entwürfen';
$messages['messagesaved'] = 'Nachricht als Entwurf gespeichert';
$messages['successfullysaved'] = 'Erfolgreich gespeichert';
program/localization/de_DE/labels.inc
@@ -38,7 +38,6 @@
$labels['drafts'] = 'Entwürfe';
$labels['sent']   = 'Gesendet';
$labels['trash']  = 'Gelöscht';
$labels['drafts'] = 'Entwürfe';
$labels['junk']   = 'Spam';
// message listing // Nachrichtenliste
@@ -122,7 +121,7 @@
// message compose // Nachrichten erstellen
$labels['compose']  = 'Neue Nachricht verfassen';
$labels['savemessage']  = 'Außer diesem Entwurf';
$labels['savemessage']  = 'Nachricht speichern';
$labels['sendmessage']  = 'Nachricht jetzt senden';
$labels['addattachment']  = 'Datei anfügen';
$labels['charset']  = 'Zeichensatz';
program/localization/de_DE/messages.inc
@@ -40,9 +40,9 @@
$messages['messagesent'] = 'Nachricht erfolgreich gesendet';
$messages['savingmessage'] = 'Einsparunganzeige...';
$messages['savingmessage'] = 'Nachricht wird gespeichert...';
$messages['messagesaved'] = 'Anzeige gespeichert zu den Entwürfen';
$messages['messagesaved'] = 'Nachricht als Entwurf gespeichert';
$messages['successfullysaved'] = 'Erfolgreich gespeichert';
program/steps/mail/sendmail.inc
@@ -62,15 +62,14 @@
  return FALSE;  
  }
if (strlen($_POST['_draft_saveid']) > 3) {
  $olddraftmessageid = $_POST['_draft_saveid'];
}
if (strlen($_POST['_draft_newsaveid']) > 3) {
  $newdraftmessageid = $_POST['_draft_newsaveid'];
}
if ($_POST['_draft']) {
  $savedraft = 1;
}
if (strlen($_POST['_draft_saveid']) > 3)
  $olddraftmessageid = get_input_value('_draft_saveid', RCUBE_INPUT_POST);
if (strlen($_POST['_draft_newsaveid']) > 3)
  $newdraftmessageid = get_input_value('_draft_newsaveid', RCUBE_INPUT_POST);
$savedraft = !empty($_POST['_draft']) ? TRUE : FALSE;
 
/****** check submission and compose message ********/
@@ -95,7 +94,7 @@
// decode address strings
$to_address_arr = $IMAP->decode_address_list($mailto);
$identity_arr = rcmail_get_identity($_POST['_from']);
$identity_arr = rcmail_get_identity(get_input_value('_from', RCUBE_INPUT_POST));
$from = $identity_arr['mailto'];
@@ -103,17 +102,19 @@
// try the message-id submitted by the compose form
if ($newdraftmessageid) {
if ($newdraftmessageid)
  $message_id = sprintf('<%s>',$newdraftmessageid);
} else {
else
  $message_id = sprintf('<%s@%s>', md5(uniqid('rcmail'.rand(),true)), $_SESSION['imap_host']);
}
if (empty($identity_arr['string']))
  $identity_arr['string'] = $from;
// compose headers array
$headers = array('Date' => date('D, j M Y G:i:s O'),
                 'From' => $identity_arr['string'],
                 'To'   => rcube_charset_convert($mailto, $input_charset, $message_charset));
                 'To'   => $mailto);
// additional recipients
if (!empty($_POST['_cc']))
@@ -218,7 +219,7 @@
                       'text_charset'  => $message_charset);
// compose message body and get headers
$msg_body = $MAIL_MIME->get($message_param);
$msg_body = &$MAIL_MIME->get($message_param);
$msg_subject = $headers['Subject'];
@@ -295,11 +296,10 @@
  } // End of SMTP Delivery Block
// Determine which folder to save message
if ($savedraft) {
    $store_target = 'drafts_mbox';
} else {
    $store_target = 'sent_mbox';
}
if ($savedraft)
  $store_target = 'drafts_mbox';
else
  $store_target = 'sent_mbox';
if ($CONFIG[$store_target])
  {
@@ -311,10 +311,13 @@
    $store_folder = $IMAP->create_mailbox($CONFIG[$store_target], TRUE);
  else
    $store_folder = TRUE;
  // add headers to message body
  $msg_body = $header_str."\r\n".$msg_body;
  // append message to sent box
  if ($store_folder)
    $saved = $IMAP->save_message($CONFIG[$store_target], $header_str."\r\n".$msg_body);
    $saved = $IMAP->save_message($CONFIG[$store_target], $msg_body);
  // raise error if saving failed
  if (!$saved)
@@ -323,7 +326,8 @@
                      'file' => __FILE__,
                      'message' => "Could not save message in $CONFIG[$store_target]"), TRUE, FALSE);
  if ($olddraftmessageid) {
  if ($olddraftmessageid)
    {
    // delete previous saved draft
    $a_deleteid = $IMAP->search($CONFIG['drafts_mbox'],'HEADER Message-ID',$olddraftmessageid);
    $deleted = $IMAP->delete_message($IMAP->get_uid($a_deleteid[0],$CONFIG['drafts_mbox']),$CONFIG['drafts_mbox']);