summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2005-10-21 12:12:23 +0000
committerthomascube <thomas@roundcube.net>2005-10-21 12:12:23 +0000
commita95e0e174c48b7c5242b8969aef99838a52c41ee (patch)
treeeb87cb9c33433269d2f2376e841e1d6d66eff667
parent7902df457d3401c83f78a6ddd48df1a7f07f68b1 (diff)
Improved support for UTF-8 and other charsets
-rw-r--r--CHANGELOG13
-rw-r--r--program/include/main.inc2
-rw-r--r--program/include/rcube_imap.inc23
-rw-r--r--program/include/rcube_shared.inc27
-rw-r--r--program/js/app.js32
-rw-r--r--program/js/common.js10
-rw-r--r--program/lib/Mail/mimeDecode.php2
-rw-r--r--program/lib/imap.inc9
-rw-r--r--program/lib/utf8.inc4
-rw-r--r--program/localization/de/labels.inc45
-rw-r--r--program/localization/de/messages.inc4
-rw-r--r--program/localization/en/labels.inc4
-rw-r--r--program/localization/index.inc2
-rw-r--r--program/steps/error.inc1
-rw-r--r--program/steps/mail/func.inc41
-rw-r--r--program/steps/mail/sendmail.inc9
-rw-r--r--program/steps/settings/manage_folders.inc6
-rwxr-xr-xskins/default/common.css1
-rw-r--r--skins/default/includes/taskbar.html6
-rw-r--r--skins/default/settings.css6
-rw-r--r--skins/default/templates/addressbook.html2
-rw-r--r--skins/default/templates/compose.html2
-rw-r--r--skins/default/templates/mail.html2
-rw-r--r--skins/default/templates/message.html6
24 files changed, 170 insertions, 89 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 142967143..ede37f4c3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -44,9 +44,16 @@ CHANGELOG RoundCube Webmail
- Enable IMAPS by host
-2005/15/16
+2005/10/20
----------
-- Added Portuguese and Catalan translation
+- Added Swedish, Portuguese and Catalan translation
- Make SMTP auth method configurable
- Make mailboxlist scrollable (Bug #1326372)
-
+- Fixed SSL support
+- Improved support for Courier IMAP (root folder and delimiter issues)
+- Moved taskbar from bottom to top
+- Added 'session_lifetime' parameter
+- Fixed wrong unread count when deleting message (Bug #1332434)
+- Srip tags when creating a new folder (Bug #1332084)
+- Translate HTML tags in message headers (Bug #1330134)
+- Correction in German translation (Bug #1329434)
diff --git a/program/include/main.inc b/program/include/main.inc
index 4a872a580..fb9d35081 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -697,7 +697,7 @@ function rcube_xml_command($command, $str_attrib, $a_attrib=NULL)
else if (isset($GLOBALS['PAGE_TITLE']))
return rep_specialchars_output("RoundCube|Mail :: ".$GLOBALS['PAGE_TITLE']);
else if ($task=='mail' && ($mbox_name = $IMAP->get_mailbox_name()))
- return "RoundCube|Mail :: $mbox_name";
+ return "RoundCube|Mail :: ".rep_specialchars_output(UTF7DecodeString($mbox_name), 'html', 'all');
else
return "RoundCube|Mail :: $task";
}
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc
index 83ee32158..009c80add 100644
--- a/program/include/rcube_imap.inc
+++ b/program/include/rcube_imap.inc
@@ -23,6 +23,7 @@
require_once('lib/imap.inc');
require_once('lib/mime.inc');
+require_once('lib/utf7.inc');
class rcube_imap
@@ -723,6 +724,19 @@ class rcube_imap
}
+ // clear all messages in a specific mailbox
+ function clear_mailbox($mbox)
+ {
+ $mailbox = $mbox ? $this->_mod_mailbox($mbox) : $this->mailbox;
+ $msg_count = $this->_messagecount($mailbox, 'ALL');
+
+ if ($msg_count>0)
+ return iil_C_ClearFolder($this->conn, $mailbox);
+ else
+ return 0;
+ }
+
+
// send IMAP expunge command and clear cache
function expunge($mbox='', $clear_cache=TRUE)
{
@@ -801,18 +815,19 @@ class rcube_imap
function create_mailbox($name, $subscribe=FALSE)
{
$result = FALSE;
- $abs_name = $this->_mod_mailbox($name);
+ $name_enc = UTF7EncodeString($name);
+ $abs_name = $this->_mod_mailbox($name_enc);
$a_mailbox_cache = $this->get_cache('mailboxes');
//if (strlen($this->root_ns))
// $abs_name = $this->root_ns.$abs_name;
if (strlen($abs_name) && (!is_array($a_mailbox_cache) || !in_array($abs_name, $a_mailbox_cache)))
- $result = iil_C_CreateFolder($this->conn, iil_utf7_encode($abs_name));
+ $result = iil_C_CreateFolder($this->conn, $abs_name);
// update mailboxlist cache
if ($result && $subscribe)
- $this->subscribe($name);
+ $this->subscribe($name_enc);
return $result ? $name : FALSE;
}
@@ -1057,7 +1072,7 @@ class rcube_imap
// convert body chars according to the ctype_parameters
function charset_decode($body, $ctype_param)
{
- if (is_array($ctype_param) && strlen($ctype_param['charset']))
+ if (is_array($ctype_param) && !empty($ctype_param['charset']))
return decode_specialchars($body, $ctype_param['charset']);
return $body;
diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc
index 8396f99d6..6874094a1 100644
--- a/program/include/rcube_shared.inc
+++ b/program/include/rcube_shared.inc
@@ -1032,7 +1032,7 @@ function rcube_browser()
function rcube_label($attrib)
{
global $sess_user_lang, $INSTALL_PATH;
- static $sa_text_data, $s_language;
+ static $sa_text_data, $s_language, $utf8_decode;
// extract attributes
if (is_string($attrib))
@@ -1071,6 +1071,12 @@ function rcube_label($attrib)
$sa_text_data = array_merge($sa_text_data, $messages);
}
+ if (isset($utf8_decoding) && $utf8_decoding==TRUE)
+ {
+ @include_once('lib/utf8.inc');
+ $utf8_decode = TRUE;
+ }
+
$s_language = $sess_user_lang;
}
@@ -1109,10 +1115,6 @@ function rcube_label($attrib)
if ($text=='')
$text = $a_text_item['single'];
- // perform utf-8 decoding
- //if (function_exists('utf8_decode'))
- // $text = utf8_decode($text);
-
// replace vars in text
if (is_array($attrib['vars']))
{
@@ -1130,6 +1132,11 @@ EOF;
");
+ // perform utf-8 decoding
+ if ($utf8_decode && function_exists('utf8ToUnicodeEntities'))
+ $text = utf8ToUnicodeEntities($text);
+
+
// format output
if (($attrib['uppercase'] && strtolower($attrib['uppercase']=='first')) || $attrib['ucfirst'])
return ucfirst($text);
@@ -1189,12 +1196,11 @@ function rep_specialchars_output($str, $enctype='', $mode='', $newlines=TRUE)
if (!$html_encode_arr)
{
$html_encode_arr = get_html_translation_table(HTML_ENTITIES);
- $html_encode_arr["?"] = '&#150;';
$html_encode_arr[chr(128)] = '&euro;';
unset($html_encode_arr['?']);
unset($html_encode_arr['&']);
}
-
+
$ltpos = strpos($str, '<');
$encode_arr = $html_encode_arr;
@@ -1254,8 +1260,11 @@ function decode_specialchars($input, $charset='')
{
$charset = strtolower($charset);
- if (strcasecmp($charset, 'utf-8')==0)
- return utf8_decode($input);
+ if ($charset=='utf-8')
+ {
+ require_once('lib/utf8.inc');
+ return utf8ToUnicodeEntities($input);
+ }
else if ($charset=="koi8-r")
return convert_cyr_string($input, 'k', 'w');
else if ($charset=="iso8859-5")
diff --git a/program/js/app.js b/program/js/app.js
index 418f33c1b..1e70c42fd 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -6,7 +6,7 @@
| Copyright (C) 2005, RoundCube Dev, - Switzerland |
| Licensed under the GNU GPL |
| |
- | Modified: 2005/10/13 (tbr) |
+ | Modified: 2005/10/21 (roundcube) |
| |
+-----------------------------------------------------------------------+
| Author: Thomas Bruederli <roundcube@gmail.com> |
@@ -31,6 +31,7 @@ function rcube_webmail()
// webmail client settings
this.dblclick_time = 600;
this.message_time = 5000;
+ this.request_timeout = 120000;
this.mbox_expression = new RegExp('[^0-9a-z\-_]', 'gi');
this.env.blank_img = 'skins/default/images/blank.gif';
@@ -76,8 +77,7 @@ function rcube_webmail()
this.task = this.env.task;
// check browser
- if (!(bw.dom && ((bw.ie && bw.vendver>=5.5 && !bw.opera) || (bw.mz && bw.vendver>=1) || (bw.safari && bw.vendver>=125) ||
- (bw.opera && bw.vendver>=8) || (bw.konq && bw.vendver>=3.4))))
+ if (!bw.dom || !bw.xmlhttp_test())
{
location.href = this.env.comm_path+'&_action=error&_code=0x199';
return;
@@ -732,6 +732,7 @@ function rcube_webmail()
};
+ // lock/unlock interface
this.set_busy = function(a, message)
{
if (a && message)
@@ -744,6 +745,14 @@ function rcube_webmail()
if (this.gui_objects.editform)
this.lock_form(this.gui_objects.editform, a);
+
+ // clear pending timer
+ if (this.request_timer)
+ clearTimeout(this.request_timer);
+
+ // set timer for requests
+ if (a && this.request_timeout)
+ this.request_timer = setTimeout(this.ref+'.request_timed_out()', this.request_timeout);
};
@@ -764,6 +773,14 @@ function rcube_webmail()
return url.replace(/_task=[a-z]+/, '_task='+task);
};
+
+
+ // called when a request timed out
+ this.request_timed_out = function()
+ {
+ this.set_busy(false);
+ this.display_message('Request timed out!', 'error');
+ };
/*********************************************************/
@@ -1968,10 +1985,14 @@ function rcube_webmail()
var cont = msg;
if (type)
cont = '<div class="'+type+'">'+cont+'</div>';
-
+
+ this.gui_objects.message._rcube = this;
this.gui_objects.message.innerHTML = cont;
this.gui_objects.message.style.display = 'block';
+ if (type!='loading')
+ this.gui_objects.message.onmousedown = function(){ this._rcube.hide_message(); return true; };
+
if (!hold)
this.message_timer = setTimeout(this.ref+'.hide_message()', this.message_time);
};
@@ -1981,7 +2002,10 @@ function rcube_webmail()
this.hide_message = function()
{
if (this.gui_objects.message)
+ {
this.gui_objects.message.style.display = 'none';
+ this.gui_objects.message.onmousedown = null;
+ }
};
diff --git a/program/js/common.js b/program/js/common.js
index 2d2c2e925..78fecf8fe 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -6,7 +6,7 @@
| Copyright (C) 2005, RoundCube Dev, - Switzerland |
| Licensed under the GNU GPL |
| |
- | Modified: 19.08.2005 (tbr) |
+ | Modified:2005/10/21 (roundcube) |
| |
+-----------------------------------------------------------------------+
| Author: Thomas Bruederli <roundcube@gmail.com> |
@@ -81,6 +81,14 @@ function roundcube_browser()
(this.ie && this.win && this.vendver>=5.5) || this.safari);
this.opacity = (this.mz || (this.ie && this.vendver>=5.5 && !this.opera) || (this.safari && this.vendver>=100));
this.cookies = navigator.cookieEnabled;
+
+ // test for XMLHTTP support
+ this.xmlhttp_test = function()
+ {
+ var activeX_test = new Function("try{var o=new ActiveXObject('Microsoft.XMLHTTP');return true;}catch(err){return false;}");
+ this.xmlhttp = (window.XMLHttpRequest || (window.ActiveXObject && activeX_test())) ? true : false;
+ return this.xmlhttp;
+ }
}
diff --git a/program/lib/Mail/mimeDecode.php b/program/lib/Mail/mimeDecode.php
index 07fe88f6e..851481434 100644
--- a/program/lib/Mail/mimeDecode.php
+++ b/program/lib/Mail/mimeDecode.php
@@ -247,7 +247,7 @@ class Mail_mimeDecode extends PEAR
$return->ctype_primary = $regs[1];
$return->ctype_secondary = $regs[2];
}
-
+
if (isset($content_type['other'])) {
while (list($p_name, $p_value) = each($content_type['other'])) {
$return->ctype_parameters[$p_name] = $p_value;
diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index 22757ba82..3d37bed17 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -1239,8 +1239,13 @@ function iil_C_FetchHeaders(&$conn, $mailbox, $message_set){
$result[$id]->cc = str_replace("\n", " ", $headers["cc"]);
$result[$id]->encoding = str_replace("\n", " ", $headers["content-transfer-encoding"]);
$result[$id]->ctype = str_replace("\n", " ", $headers["content-type"]);
- //$result[$id]->in_reply_to = ereg_replace("[\n<>]",'', $headers['in-reply-to']);
- list($result[$id]->ctype,$foo) = explode(";", $headers["content-type"]);
+ $result[$id]->in_reply_to = ereg_replace("[\n<>]",'', $headers['in-reply-to']);
+
+ list($result[$id]->ctype, $ctype_add) = explode(";", $headers["content-type"]);
+
+ if (preg_match('/charset="?([a-z0-9\-]+)"?/i', $ctype_add, $regs))
+ $result[$id]->charset = $regs[1];
+
$messageID = $headers["message-id"];
if ($messageID) $messageID = substr(substr($messageID, 1), 0, strlen($messageID)-2);
else $messageID = "mid:".$id;
diff --git a/program/lib/utf8.inc b/program/lib/utf8.inc
index 72a96b4e9..43ecb328b 100644
--- a/program/lib/utf8.inc
+++ b/program/lib/utf8.inc
@@ -88,7 +88,9 @@ function utf8ToUnicodeEntities ($source) {
$thisPos++;
}
- if ($thisLen == 1)
+ if ($decimalCode<128)
+ $encodedLetter = chr($decimalCode);
+ else if ($thisLen == 1)
$encodedLetter = "&#". str_pad($decimalCode, 3, "0", STR_PAD_LEFT) . ';';
else
$encodedLetter = "&#". str_pad($decimalCode, 5, "0", STR_PAD_LEFT) . ';';
diff --git a/program/localization/de/labels.inc b/program/localization/de/labels.inc
index 08fd870c0..a5a0a410a 100644
--- a/program/localization/de/labels.inc
+++ b/program/localization/de/labels.inc
@@ -9,7 +9,8 @@
| Licensed under the GNU GPL |
| |
+-----------------------------------------------------------------------+
- | Author: Thomas Bruederli <roundcube@gmail.com> |
+ | Author: Thomas Bruederli <roundcube@gmail.com> |
+ | Corrections: Alexander Stiebing <ja.stiebing[NOSPAM]@web.de> |
+-----------------------------------------------------------------------+
$Id$
@@ -18,46 +19,46 @@
$labels = array();
-// login page
+// login page // Login-Seite
$labels['username'] = 'Benutzername';
$labels['password'] = 'Passwort';
$labels['server'] = 'Server';
$labels['login'] = 'Login';
-// taskbar
+// taskbar // Aktionsleiste
$labels['logout'] = 'Logout';
$labels['mail'] = 'E-Mail';
$labels['settings'] = 'Einstellungen';
$labels['addressbook'] = 'Adressbuch';
-// mailbox names
+// mailbox names // E-Mail-Ordnernamen
$labels['inbox'] = 'Posteingang';
$labels['sent'] = 'Gesendet';
$labels['trash'] = 'Gelöscht';
$labels['drafts'] = 'Vorlagen';
$labels['junk'] = 'Junk';
-// message listing
+// message listing // Nachrichtenliste
$labels['subject'] = 'Betreff';
$labels['from'] = 'Absender';
$labels['to'] = 'Empfänger';
-$labels['cc'] = 'Kopie';
-$labels['bcc'] = 'Bcc';
+$labels['cc'] = 'Kopie (CC)';
+$labels['bcc'] = 'Blind-Kopie';
$labels['replyto'] = 'Antwort an';
$labels['date'] = 'Datum';
-$labels['size'] = 'Grösse';
+$labels['size'] = 'Größe';
$labels['priority'] = 'Priorität';
$labels['organization'] = 'Organisation';
-// aliases
+// aliases // [Platzhalter]
$labels['reply-to'] = $labels['replyto'];
$labels['mailboxlist'] = 'Ordner';
$labels['messagesfromto'] = 'Nachrichten $from bis $to von $count';
$labels['messagenrof'] = 'Nachrichten $nr von $count';
-$labels['moveto'] = 'verschieben nach...';
-$labels['download'] = 'download';
+$labels['moveto'] = 'Verschieben nach...';
+$labels['download'] = 'Download';
$labels['filename'] = 'Dateiname';
$labels['filesize'] = 'Dateigrösse';
@@ -68,7 +69,7 @@ $labels['prettydate'] = 'Kurze Datumsanzeige';
$labels['addtoaddressbook'] = 'Ins Adressbuch übernehmen';
-// weekdays short
+// weekdays short // Wochentage (Abkürzungen)
$labels['sun'] = 'So';
$labels['mon'] = 'Mo';
$labels['tue'] = 'Di';
@@ -77,7 +78,7 @@ $labels['thu'] = 'Do';
$labels['fri'] = 'Fr';
$labels['sat'] = 'Sa';
-// weekdays long
+// weekdays long // Wochentage (normal)
$labels['sunday'] = 'Sonntag';
$labels['monday'] = 'Montag';
$labels['tuesday'] = 'Dienstag';
@@ -88,7 +89,7 @@ $labels['saturday'] = 'Samstag';
$labels['today'] = 'Heute';
-// toolbar buttons
+// toolbar buttons // Symbolleisten-Tipps
$labels['writenewmessage'] = 'Neue Nachricht schreiben';
$labels['replytomessage'] = 'Antwort verfassen';
$labels['forwardmessage'] = 'Nachricht weiterleiten';
@@ -103,17 +104,17 @@ $labels['all'] = 'Alle';
$labels['none'] = 'Keine';
$labels['unread'] = 'Ungelesene';
-// message compose
+// message compose // Nachrichten erstellen
$labels['compose'] = 'Neue Nachricht verfassen';
$labels['sendmessage'] = 'Nachricht jetzt senden';
$labels['addattachment'] = 'Datei anfügen';
$labels['attachments'] = 'Anhänge';
$labels['upload'] = 'Hochladen';
-$labels['close'] = 'Schliessen';
+$labels['close'] = 'Schließen';
-$labels['low'] = 'Tief';
-$labels['lowest'] = 'Tiefste';
+$labels['low'] = 'Niedrig';
+$labels['lowest'] = 'Niedrigste';
$labels['normal'] = 'Normal';
$labels['high'] = 'Hoch';
$labels['highest'] = 'Höchste';
@@ -121,7 +122,7 @@ $labels['highest'] = 'Höchste';
$labels['showimages'] = 'Bilder anzeigen';
-// address boook
+// address book // Adressbuch
$labels['name'] = 'Anzeigename';
$labels['firstname'] = 'Vorname';
$labels['surname'] = 'Nachname';
@@ -139,14 +140,16 @@ $labels['newcontact'] = 'Neuen Kontakt erfassen';
$labels['deletecontact'] = 'Gewählte Kontakte löschen';
$labels['composeto'] = 'Nachricht verfassen';
$labels['contactsfromto'] = 'Kontakte $from bis $to von $count';
+$labels['print'] = 'Drucken';
+$labels['export'] = 'Exportieren';
-// settings
+// settings // Einstellungen
$labels['settingsfor'] = 'Einstellungen für';
$labels['preferences'] = 'Einstellungen';
$labels['userpreferences'] = 'Benutzereinstellungen';
-$labels['editpreferences'] = 'Ereinstellungen bearbeiten';
+$labels['editpreferences'] = 'Einstellungen bearbeiten';
$labels['identities'] = 'Absender';
$labels['manageidentities'] = 'Absender für dieses Konto verwalten';
diff --git a/program/localization/de/messages.inc b/program/localization/de/messages.inc
index 3061bf045..41470fab4 100644
--- a/program/localization/de/messages.inc
+++ b/program/localization/de/messages.inc
@@ -24,9 +24,9 @@ $messages['cookiesdisabled'] = 'Ihr Browser akzeptiert keine Cookies';
$messages['sessionerror'] = 'Ihre Session ist ungültig oder abgelaufen';
-$messages['imaperror'] = 'Keine Verbindung zum IMAP server';
+$messages['imaperror'] = 'Keine Verbindung zum IMAP Server';
-$messages['nomessagesfound'] = 'Keine Nachrichten in diesem Order';
+$messages['nomessagesfound'] = 'Keine Nachrichten in diesem Ordner';
$messages['loggedout'] = 'Sie haben Ihre Session erfolgreich beendet. Auf Wiedersehen!';
diff --git a/program/localization/en/labels.inc b/program/localization/en/labels.inc
index bf92bcd15..35b0e3f5a 100644
--- a/program/localization/en/labels.inc
+++ b/program/localization/en/labels.inc
@@ -140,8 +140,8 @@ $labels['newcontact'] = 'Create new contact card';
$labels['deletecontact'] = 'Delete selected contacts';
$labels['composeto'] = 'Compose mail to';
$labels['contactsfromto'] = 'Contacts $from to $to of $count';
-$labels['print'] = 'Imprimir';
-$labels['export'] = 'Exportar';
+$labels['print'] = 'Print';
+$labels['export'] = 'Export';
// settings
diff --git a/program/localization/index.inc b/program/localization/index.inc
index 6f68b0c46..e50a2713c 100644
--- a/program/localization/index.inc
+++ b/program/localization/index.inc
@@ -39,7 +39,7 @@
'it' => 'Italiano',
'jp' => 'Japanese',
'kr' => 'Korean',
- 'lt' => 'Lithuanian',
+ 'lv' => 'Latvian',
'nl' => 'Nederlands',
'no' => 'Norsk (bokm&aring;l)',
'fa' => 'Persian',
diff --git a/program/steps/error.inc b/program/steps/error.inc
index 9e5757d7b..aa8036afe 100644
--- a/program/steps/error.inc
+++ b/program/steps/error.inc
@@ -34,6 +34,7 @@ if ($ERROR_CODE==409)
&raquo; &nbsp;Safari 1.2+<br />
<br />
&raquo; &nbsp;JavaScript enabled<br />
+&raquo; &nbsp;Support for XMLHTTPRequest<br />
<p><i>Your configuration:</i><br />
$user_agent</p>
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 98e0cdbbf..059a8cfcb 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -21,6 +21,8 @@
require_once('lib/html2text.inc');
require_once('lib/enriched.inc');
+require_once('lib/utf8.inc');
+require_once('lib/utf7.inc');
$EMAIL_ADDRESS_PATTERN = '/([a-z0-9][a-z0-9\-\.\+\_]*@[a-z0-9]([a-z0-9\-][.]?)*[a-z0-9]\\.[a-z]{2,5})/i';
@@ -157,12 +159,15 @@ function rcmail_render_folder_tree_html(&$arrFolders, &$special, &$mbox, $maxlen
if (in_array($folder_lc, $special))
$foldername = rcube_label($folder_lc);
else
- $foldername = $folder['name'];
+ {
+ $foldername = UTF7DecodeString($folder['name']);
- // shorten the folder name to a given length
- if ($maxlength && $maxlength>1)
- $foldername = abbrevate_string($foldername, $maxlength);
+ // shorten the folder name to a given length
+ if ($maxlength && $maxlength>1)
+ $foldername = abbrevate_string($foldername, $maxlength);
+ }
+ // add unread message count display
if ($unread_count = $IMAP->messagecount($folder['id'], 'UNSEEN', ($folder['id']==$mbox)))
$foldername .= sprintf(' (%d)', $unread_count);
@@ -176,7 +181,7 @@ function rcmail_render_folder_tree_html(&$arrFolders, &$special, &$mbox, $maxlen
$folder['id'],
$JS_OBJECT_NAME,
$folder['id'],
- rep_specialchars_output($foldername));
+ rep_specialchars_output($foldername, 'html', 'all'));
if (!empty($folder['folders']))
$out .= '<ul>' . rcmail_render_folder_tree_html($folder['folders'], $special, $mbox, $maxlength, $nestLevel+1) . "</ul>\n";
@@ -202,16 +207,18 @@ function rcmail_render_folder_tree_select(&$arrFolders, &$special, &$mbox, $maxl
if (in_array($folder_lc, $special))
$foldername = rcube_label($folder_lc);
else
- $foldername = $folder['name'];
-
- // shorten the folder name to a given length
- if ($maxlength && $maxlength>1)
- $foldername = abbrevate_string($foldername, $maxlength);
+ {
+ $foldername = UTF7DecodeString($folder['name']);
+
+ // shorten the folder name to a given length
+ if ($maxlength && $maxlength>1)
+ $foldername = abbrevate_string($foldername, $maxlength);
+ }
$out .= sprintf('<option value="%s">%s%s</option>'."\n",
$folder['id'],
str_repeat('&nbsp;', $nestLevel*4),
- rep_specialchars_output($foldername));
+ rep_specialchars_output($foldername, 'html', 'all'));
if (!empty($folder['folders']))
$out .= rcmail_render_folder_tree_select($folder['folders'], $special, $mbox, $maxlength, $nestLevel+1);
@@ -600,6 +607,7 @@ function rcmail_parse_message($structure, $arg=array(), $recursive=FALSE)
'body' => $structure->body,
'ctype_primary' => $message_ctype_primary,
'ctype_secondary' => $message_ctype_secondary,
+ 'parameters' => $structure->ctype_parameters,
'encoding' => $structure->headers['content-transfer-encoding']);
}
@@ -693,6 +701,7 @@ function rcmail_parse_message($structure, $arg=array(), $recursive=FALSE)
'body' => $mail_part->body,
'ctype_primary' => $primary_type,
'ctype_secondary' => $secondary_type,
+ 'parameters' => $mail_part->ctype_parameters,
'encoding' => $mail_part->headers['content-transfer-encoding']);
}
@@ -867,7 +876,9 @@ function rcmail_message_body($attrib)
$out .= rcmail_message_headers(sizeof($header_attrib) ? $header_attrib : NULL, $part['headers']);
else if ($part['type']=='content')
{
-// var_dump($part['parameters']);
+ if (empty($part['parameters']) || empty($part['parameters']['charset']))
+ $part['parameters']['charset'] = $MESSAGE['headers']->charset;
+
// $body = rcmail_print_body($part['body'], $part['ctype_primary'], $part['ctype_secondary'], $part['encoding'], $safe_mode);
$body = rcmail_print_body($part, $safe_mode);
$out .= '<div class="message-part">';
@@ -1078,7 +1089,7 @@ function rcmail_address_string($input, $max=NULL, $addicon=NULL)
{
$j++;
if ($PRINT_MODE)
- $out .= sprintf('%s &lt;%s&gt;', htmlentities($part['name']), $part['mailto']);
+ $out .= sprintf('%s &lt;%s&gt;', rep_specialchars_output($part['name']), $part['mailto']);
else if (preg_match($EMAIL_ADDRESS_PATTERN, $part['mailto']))
{
$out .= sprintf('<a href="mailto:%s" onclick="return %s.command(\'compose\',\'%s\',this)" class="rcmContactAddress" title="%s">%s</a>',
@@ -1086,7 +1097,7 @@ function rcmail_address_string($input, $max=NULL, $addicon=NULL)
$JS_OBJECT_NAME,
$part['mailto'],
$part['mailto'],
- htmlentities($part['name']));
+ rep_specialchars_output($part['name']));
if ($addicon)
$out .= sprintf('&nbsp;<a href="#add" onclick="return %s.command(\'add-contact\',\'%s\',this)" title="%s"><img src="%s%s" alt="add" border="0" /></a>',
@@ -1099,7 +1110,7 @@ function rcmail_address_string($input, $max=NULL, $addicon=NULL)
else
{
if ($part['name'])
- $out .= htmlentities($part['name']);
+ $out .= rep_specialchars_output($part['name']);
if ($part['mailto'])
$out .= (strlen($out) ? ' ' : '') . sprintf('&lt;%s&gt;', $part['mailto']);
}
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 61821261d..809aed534 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -147,9 +147,16 @@ if (is_array($_FILES['_attachments']['tmp_name']))
foreach ($_FILES['_attachments']['tmp_name'] as $i => $filepath)
$MAIL_MIME->addAttachment($filepath, $files['type'][$i], $files['name'][$i], TRUE);
+// encoding settings for mail composing
+$message_param = array('text_encoding' => '7bit',
+ 'html_encoding' => 'quoted-printable',
+ 'head_encoding' => 'quoted-printable',
+ 'head_charset' => 'ISO-8859-1',
+ 'html_charset' => 'UTF-8',
+ 'text_charset' => 'UTF-8');
// compose message body and get headers
-$msg_body = $MAIL_MIME->get();
+$msg_body = $MAIL_MIME->get($message_param);
$msg_subject = $headers['Subject'];
diff --git a/program/steps/settings/manage_folders.inc b/program/steps/settings/manage_folders.inc
index b960561f7..04b2a461e 100644
--- a/program/steps/settings/manage_folders.inc
+++ b/program/steps/settings/manage_folders.inc
@@ -19,6 +19,8 @@
*/
+require_once('lib/utf7.inc');
+
// init IAMP connection
rcmail_imap_init(TRUE);
@@ -47,7 +49,7 @@ else if ($_action=='unsubscribe')
else if ($_action=='create-folder')
{
if (strlen($_GET['_name']))
- $create = $IMAP->create_mailbox(trim($_GET['_name']), TRUE);
+ $create = $IMAP->create_mailbox(strip_tags(trim($_GET['_name'])), TRUE);
if ($create && $_GET['_remote'])
{
@@ -122,7 +124,7 @@ function rcube_subscription_form($attrib)
$out .= sprintf('<tr id="rcmrow%d" class="%s"><td>%s</td><td>%s</td><td><a href="#delete" onclick="%s.command(\'delete-folder\',\'%s\')" title="%s">%s</a></td>',
$i+1,
$zebra_class,
- rep_specialchars_output($folder, 'html'),
+ rep_specialchars_output(UTF7DecodeString($folder), 'html', 'all'),
$checkbox_subscribe->show(in_array($folder, $a_subscribed)?$folder:'', array('value' => $folder)),
$JS_OBJECT_NAME,
$folder_js,
diff --git a/skins/default/common.css b/skins/default/common.css
index 67e404e69..d133bec21 100755
--- a/skins/default/common.css
+++ b/skins/default/common.css
@@ -170,6 +170,7 @@ a.button-logout
left: 200px;
right: 200px;
z-index: 5000;
+ opacity: 0.85;
}
#message div
diff --git a/skins/default/includes/taskbar.html b/skins/default/includes/taskbar.html
deleted file mode 100644
index be3d57df0..000000000
--- a/skins/default/includes/taskbar.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-<!--
-<form name="debugform" style="position:absolute; right:10px; bottom:10px;">
-<textarea name="console" cols="60" rows="15" wrap="off"></textarea>
-</form>
---> \ No newline at end of file
diff --git a/skins/default/settings.css b/skins/default/settings.css
index 427a73968..fe6a5898b 100644
--- a/skins/default/settings.css
+++ b/skins/default/settings.css
@@ -4,7 +4,7 @@
#tabsbar
{
position: absolute;
- top: 45px;
+ top: 50px;
left: 220px;
right: 60px;
height: 22px;
@@ -47,7 +47,7 @@ span.tablink-selected a
#userprefs-box
{
position: absolute;
- top: 90px;
+ top: 95px;
left: 20px;
width: 550px;
border: 1px solid #999999;
@@ -63,7 +63,7 @@ span.tablink-selected a
#folder-manager
{
position: absolute;
- top: 90px;
+ top: 95px;
left: 20px;
}
diff --git a/skins/default/templates/addressbook.html b/skins/default/templates/addressbook.html
index 99c2c8efb..b2ed21029 100644
--- a/skins/default/templates/addressbook.html
+++ b/skins/default/templates/addressbook.html
@@ -31,7 +31,5 @@
<roundcube:object name="addressframe" id="contact-frame" width="100%" height="100%" frameborder="0" src="/watermark.html" />
</div>
-<roundcube:include file="/includes/taskbar.html" />
-
</body>
</html>
diff --git a/skins/default/templates/compose.html b/skins/default/templates/compose.html
index 5fd5e7397..5774b78fa 100644
--- a/skins/default/templates/compose.html
+++ b/skins/default/templates/compose.html
@@ -112,7 +112,5 @@ function rcmail_toggle_display(id)
</div>
-->
-<roundcube:include file="/includes/taskbar.html" />
-
</body>
</html>
diff --git a/skins/default/templates/mail.html b/skins/default/templates/mail.html
index 631f46d59..56d0df66f 100644
--- a/skins/default/templates/mail.html
+++ b/skins/default/templates/mail.html
@@ -45,7 +45,5 @@
<roundcube:button command="select-none" label="none" classAct="active" />
</div>
-<roundcube:include file="/includes/taskbar.html" />
-
</body>
</html>
diff --git a/skins/default/templates/message.html b/skins/default/templates/message.html
index 5eafb59ae..3c276d0d1 100644
--- a/skins/default/templates/message.html
+++ b/skins/default/templates/message.html
@@ -16,7 +16,7 @@
<roundcube:button command="delete" imageAct="/images/buttons/delete_act.png" imagePas="/images/buttons/delete_pas.png" width="32" height="32" title="deletemessage" />
<roundcube:button command="print" imageAct="/images/buttons/print_act.png" imagePas="/images/buttons/print_pas.png" width="32" height="32" title="printmessage" />
<roundcube:button command="viewsource" imageAct="/images/buttons/source_act.png" imagePas="/images/buttons/source_pas.png" width="32" height="32" title="viewsource" />
-<roundcube:object name="mailboxlist" type="select" noSelection="moveto" onchange="rcmail.command('moveto', this.options[this.selectedIndex].value)" class="mboxlist" />
+<roundcube:object name="mailboxlist" type="select" noSelection="moveto" maxlength="25" onchange="rcmail.command('moveto', this.options[this.selectedIndex].value)" class="mboxlist" />
</div>
<div id="messagecountbar">
@@ -26,7 +26,7 @@
</div>
<div id="mailboxlist-header"><roundcube:label name="mailboxlist" /></div>
-<div id="mailboxlist-container"><roundcube:object name="mailboxlist" id="mailboxlist" /></div>
+<div id="mailboxlist-container"><roundcube:object name="mailboxlist" id="mailboxlist" maxlength="16" /></div>
<div id="messageframe">
<roundcube:object name="messageHeaders" class="headers-table" cellspacing="0" cellpadding="2" addicon="/images/icons/plus.gif" summary="Message headers" />
@@ -35,7 +35,5 @@
<roundcube:object name="messageBody" id="messagebody" showImages="true" />
</div>
-<roundcube:include file="/includes/taskbar.html" />
-
</body>
</html>