There are an error in function rcmail_message_list_smart_column_name in module func.inc
Good function looks like this
function rcmail_message_list_smart_column_name() { global $RCMAIL;
$delim = $RCMAIL->storage->get_hierarchy_delimiter();
$mbox = $RCMAIL->output->get_env('mailbox') ?:
$RCMAIL->storage->get_folder(); $sent_mbox = $RCMAIL->config->get('sent_mbox'); $drafts_mbox = $RCMAIL->config->get('drafts_mbox');
if (((strpos($mbox.$delim, $sent_mbox.$delim) === false) ||
(strpos($mbox.$delim, $drafts_mbox.$delim) === false)) && (strpos(strtoupper($mbox.$delim), 'INBOX'.$delim) === false) ) { return 'to'; }
return 'from';
}
On 04/08/2015 09:20 AM, Барсуков Сергей wrote:
There are an error in function rcmail_message_list_smart_column_name in module func.inc
Next time please use unified diff format.
if (((strpos($mbox.$delim, $sent_mbox.$delim) === false) ||
(strpos($mbox.$delim, $drafts_mbox.$delim) === false)) && (strpos(strtoupper($mbox.$delim), 'INBOX'.$delim) === false) ) {
I do not agree with this. There are servers where all folders are subfolders of INBOX. The second line will just not work as expected for them. Also, in the first line the point is to do prefix matching, so "=== false" is not what we want here.
Sorry, proposed change completely does not make sense for me.
Thank you for answer! It was my first try. I`am sorry for mistakes.
The main problem in original code is in comparison result of function strpos and 0. So, if you have an Archive folder then for all subfolders of Archive it is showing 'from address' in from/to column. Even if this one folder is 'Archive\Send'. I think this is wrong.
Среда, 8 апреля 2015, 9:40 +02:00 от "A.L.E.C" alec@alec.pl:
On 04/08/2015 09:20 AM, Барсуков Сергей wrote:
There are an error in function rcmail_message_list_smart_column_name in module func.inc
Next time please use unified diff format.
if (((strpos($mbox.$delim, $sent_mbox.$delim) === false) ||
(strpos($mbox.$delim, $drafts_mbox.$delim) === false)) && (strpos(strtoupper($mbox.$delim), 'INBOX'.$delim) === false) ) {
I do not agree with this. There are servers where all folders are subfolders of INBOX. The second line will just not work as expected for them. Also, in the first line the point is to do prefix matching, so "=== false" is not what we want here.
Sorry, proposed change completely does not make sense for me.
-- Aleksander 'A.L.E.C' Machniak Kolab Groupware Developer [ http://kolab.org ] Roundcube Webmail Developer [ http://roundcube.net ]
PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl _______________________________________________ Roundcube Development discussion mailing list dev@lists.roundcube.net http://lists.roundcube.net/mailman/listinfo/dev
On 04/11/2015 03:24 PM, Sergey Barsukov wrote:
The main problem in original code is in comparison result of function strpos and 0. So, if you have an Archive folder then for all subfolders of Archive it is showing 'from address' in from/to column. Even if this one folder is 'Archive\Send'. I think this is wrong.
Works for me. I suppose you just didn't assign this folder in Preferences > Special Folders. BTW, there can be only one "Sent" folder.