Hi!
Whenever a mailbox has some non-ASCII characters encoded in UTF-7, it then contains an ampersand, which should be encoded each time it's used in URL. There are some variables both in PHP and JS code, that are used literally, which causes some failures when dealing with such mailboxes, especially when trying to get an attachment. Another issue, which I found while debugging the abovementioned issue, is that given a wrong mail part number with the _part parameter, RC returns an invalid, zero-length, message with MIME type set to '/' (yes, with both major and minor types empty). Well, the source code seems to suggest, that RC was supposed to return "HTTP/1.1 404 Not Found", but due to a semicolon right after an 'if' condition, it always tries to return the message part, thus never reaching the 404 code. Strange as it may seem, PHP did not raise any syntax error. I hope I made myself clear enough :] So, here is the diff to RC rev 511, which unfortunately, besides fixes to these bugs, contains some other bugfix along with some feature improvements, which I described in http://lists.roundcube.net/mail-archive/roundcube.dev/2007/02/53/ but which didn't get into the repository :] It's just because I keep all my changes in a local copy of the repo. And there are some translation fixes too, it would be nice if you could change that as well, as the present translation is a bit misleading.
Sorry for the long explanations, and once again, thanks for the greatest free webmail ever!
----PATCH----PATCH----PATCH----PATCH----PATCH----PATCH----PATCH----PATCH---- Index: program/localization/pl/labels.inc =================================================================== --- program/localization/pl/labels.inc (wersja 511) +++ program/localization/pl/labels.inc (kopia robocza) @@ -91,8 +91,8 @@ $labels['all'] = 'Zaznacz wszystkie'; $labels['none'] = 'Odznacz'; $labels['unread'] = 'Zaznacz nieprzeczytane'; -$labels['compact'] = 'Kompaktuj'; -$labels['empty'] = 'Pusty'; +$labels['compact'] = 'Upakuj'; +$labels['empty'] = 'Opróżnij'; $labels['purge'] = 'Oczyść'; $labels['quota'] = 'Użyta Przestrzeń'; $labels['unknown'] = 'nieznane'; Index: program/js/list.js =================================================================== --- program/js/list.js (wersja 511) +++ program/js/list.js (kopia robocza) @@ -35,6 +35,7 @@ this.shiftkey = false;
this.multiselect = false;
@@ -216,7 +217,7 @@ if (this.draggable && this.selection.length) { this.drag_start = true;
@@ -304,6 +305,7 @@ { this.shift_start = id; this.highlight_row(id, false);
@@ -327,6 +329,7 @@ this.highlight_row(id, false); break; }
this.multi_selecting = true; }
// trigger event if selection changed
--- program/js/app.js (wersja 511) +++ program/js/app.js (kopia robocza) @@ -125,11 +125,11 @@ this.message_list.addEventListener('dblclick', function(o){ p.msglist_dbl_click(o); }); this.message_list.addEventListener('keypress', function(o){ p.msglist_keypress(o); }); this.message_list.addEventListener('select', function(o){ p.msglist_select(o); });
this.message_list.addEventListener('dragstart', function(o){ pdrag_active = true; });
this.message_list.addEventListener('dragstart', function(o){ pdrag_active = true; if (p.preview_timer) clearTimeout(p.preview_timer); });
this.message_list.addEventListener('dragend', function(o){ p.drag_active = false; });
this.message_list.init();
this.enable_command('toggle_status', true);
this.enable_command('toggle_status', 'sort', true);
if (this.gui_objects.mailcontframe)
{
@@ -147,15 +147,9 @@ { this.enable_command('show', 'reply', 'reply-all', 'forward', 'moveto', 'delete', 'viewsource', 'print', 'load-attachment', true); if (this.env.next_uid)
{
this.enable_command('nextmessage', true);
this.enable_command('lastmessage', true);
}
this.enable_command('nextmessage', 'lastmessage', true);
if (this.env.prev_uid)
{
this.enable_command('previousmessage', true);
this.enable_command('firstmessage', true);
}
this.enable_command('previousmessage', 'firstmessage', true);
}
// make preview/message frame visible
@@ -186,7 +180,7 @@ }
if (this.env.messagecount)
this.enable_command('select-all', 'select-none', 'sort', 'expunge', true);
this.enable_command('select-all', 'select-none', 'expunge', true);
if (this.env.messagecount && (this.env.mailbox==this.env.trash_mailbox || this.env.mailbox==this.env.junk_mailbox))
this.enable_command('purge', true);
@@ -666,7 +660,7 @@ break;
case 'load-attachment':
var qstring = '_mbox='+this.env.mailbox+'&_uid='+this.env.uid+'&_part='+props.part;
var qstring = '_mbox='+urlencode(this.env.mailbox)+'&_uid='+this.env.uid+'&_part='+props.part;
// open attachment in frame if it's of a supported mimetype
if (this.env.uid && props.mimetype && find_in_array(props.mimetype, this.mimetypes)>=0)
@@ -1095,7 +1089,7 @@ }
// start timer for message preview (wait for double click)
@@ -1927,7 +1921,7 @@ { this.message_list.clear(); this.set_busy(true, 'searching');
this.http_request('search', '_search='+value+'&_mbox='+mbox, true);
this.http_request('search', '_search='+value+'&_mbox='+urlencode(mbox), true);
}
return true;
};--- program/steps/mail/get.inc (wersja 511) +++ program/steps/mail/get.inc (kopia robocza) @@ -55,7 +55,7 @@
else if ($pid = get_input_value('_part', RCUBE_INPUT_GET)) {
--- program/steps/mail/func.inc (wersja 511) +++ program/steps/mail/func.inc (kopia robocza) @@ -59,7 +59,7 @@
// define url for getting message parts if (strlen($_GET['_uid']))
// set current mailbox in client environment ----PATCH----PATCH----PATCH----PATCH----PATCH----PATCH----PATCH----PATCH----