diff options
author | thomascube <thomas@roundcube.net> | 2006-06-26 18:38:03 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2006-06-26 18:38:03 +0000 |
commit | b068a07db2c519cde6bf1715e725cb70f2bbbc35 (patch) | |
tree | 85f04753c2ac49b77d7523885e346fbabee9069c | |
parent | bac9ff3393cf4b398b076c7c635c68604055dd75 (diff) |
Typos, Optimizations, Updates
-rw-r--r-- | CHANGELOG | 10 | ||||
-rw-r--r-- | UPGRADING | 22 | ||||
-rw-r--r-- | program/include/main.inc | 2 | ||||
-rw-r--r-- | program/include/rcube_imap.inc | 2 | ||||
-rw-r--r-- | program/include/rcube_smtp.inc | 2 | ||||
-rw-r--r-- | program/localization/de_CH/labels.inc | 3 | ||||
-rw-r--r-- | program/localization/de_CH/messages.inc | 4 | ||||
-rw-r--r-- | program/localization/de_DE/labels.inc | 3 | ||||
-rw-r--r-- | program/localization/de_DE/messages.inc | 4 | ||||
-rw-r--r-- | program/steps/mail/sendmail.inc | 48 |
10 files changed, 65 insertions, 35 deletions
@@ -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 @@ -71,6 +71,10 @@ from version 0.1-20051007 $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 @@ from version 0.1-20051007 $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 @@ from version 0.1-20051021 $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 @@ from version 0.1-20051021 $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 @@ form version 0.1-beta - 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; + diff --git a/program/include/main.inc b/program/include/main.inc index c5370b144..0a158dcb6 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -44,7 +44,7 @@ function rcmail_startup($task='mail') $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'; diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc index bf23f7165..dccd64fc9 100644 --- a/program/include/rcube_imap.inc +++ b/program/include/rcube_imap.inc @@ -990,7 +990,7 @@ class rcube_imap // 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); diff --git a/program/include/rcube_smtp.inc b/program/include/rcube_smtp.inc index 63cdc1e58..3108675f5 100644 --- a/program/include/rcube_smtp.inc +++ b/program/include/rcube_smtp.inc @@ -49,7 +49,7 @@ $SMTP_CONN = null; * @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; diff --git a/program/localization/de_CH/labels.inc b/program/localization/de_CH/labels.inc index 9fa6c048c..9141564c0 100644 --- a/program/localization/de_CH/labels.inc +++ b/program/localization/de_CH/labels.inc @@ -37,7 +37,6 @@ $labels['inbox'] = 'Posteingang'; $labels['drafts'] = 'Entwürfe'; $labels['sent'] = 'Gesendet'; $labels['trash'] = 'Gelöscht'; -$labels['drafts'] = 'Vorlagen'; $labels['junk'] = 'Junk'; // message listing // Nachrichtenliste @@ -121,7 +120,7 @@ $labels['resetsearch'] = 'Löschen'; // 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'; diff --git a/program/localization/de_CH/messages.inc b/program/localization/de_CH/messages.inc index 767b54f60..57c1513a2 100644 --- a/program/localization/de_CH/messages.inc +++ b/program/localization/de_CH/messages.inc @@ -38,9 +38,9 @@ $messages['sendingmessage'] = 'Nachricht wird gesendet...'; $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'; diff --git a/program/localization/de_DE/labels.inc b/program/localization/de_DE/labels.inc index 00052c079..ac74b304a 100644 --- a/program/localization/de_DE/labels.inc +++ b/program/localization/de_DE/labels.inc @@ -38,7 +38,6 @@ $labels['inbox'] = 'Posteingang'; $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 @@ $labels['resetsearch'] = 'Löschen'; // 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'; diff --git a/program/localization/de_DE/messages.inc b/program/localization/de_DE/messages.inc index 7eb90f9f7..622cd0d7d 100644 --- a/program/localization/de_DE/messages.inc +++ b/program/localization/de_DE/messages.inc @@ -40,9 +40,9 @@ $messages['sendingmessage'] = 'Nachricht wird gesendet...'; $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'; diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index 68e9fadd6..a57f2d4ed 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -62,15 +62,14 @@ function rcmail_get_identity($id) 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 @@ $mailto = preg_replace($mailto_regexp, $mailto_replace, get_input_value('_to', R // 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 @@ $first_to = is_array($to_address_arr[0]) ? $to_address_arr[0]['mailto'] : $mailt // 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 @@ $message_param = array('text_encoding' => $transfer_encoding, '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 @@ if (!$savedraft) { } // 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 @@ if ($CONFIG[$store_target]) $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 @@ if ($CONFIG[$store_target]) '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']); |