1 message in net.sourceforge.lists.courier-sqwebmail[sqwebmail] Function show_transfer_de...
FromSent OnAttachments
Anton DobkinSep 26, 2007 7:55 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[sqwebmail] Function show_transfer_dest_real1 in a file folder.c works a little bit incorrectly.Actions...
From:Anton Dobkin (adob@viansib.ru)
Date:Sep 26, 2007 7:55:40 am
List:net.sourceforge.lists.courier-sqwebmail

Function show_transfer_dest_real1 in a file folder.c works a little bit incorrectly.

The block of a code:

if (strcmp (p, INBOX) == 0) p=folder_inbox; else if (strcmp (p, INBOX". DRAFTS) == 0) p=folder_drafts; else if (strcmp (p, INBOX". TRASH) == 0) p=folder_trash; else if (strcmp (p, INBOX". SENT) == 0) p=folder_sent; if (! p) p=folders [i];

Should translate names of folders DRAFTS, SENT, TRASH and INBOX on other languages. In a string variable with a name ' p ' should will be saved the translated name of these folders, and then to be displayed in the dropping out list. And it would be successful if not the operator

p=strchr (folders [i], '. ');

Which overwrites a value a real name of a folder (in English) and above brought code as a matter of fact is not meaningful

I Send you patch which corrects it. :-)

diff -Nur sqwebmail-5.1.6.orig/sqwebmail/folder.c
sqwebmail-5.1.6/sqwebmail/folder.c --- sqwebmail-5.1.6.orig/sqwebmail/folder.c 2007-02-25 01:05:45.000000000 +0600 +++ sqwebmail-5.1.6/sqwebmail/folder.c 2007-09-26 21:45:51.000000000 +0700 @@ -1239,7 +1239,8 @@ p=folder_trash; else if (strcmp(p, INBOX "." SENT) == 0) p=folder_sent; - if (!p) p=folders[i]; + else + p=strchr(folders[i], '.') + 1;

if (strncmp(folders[i], SHARED ".", sizeof(SHARED)) == 0) { @@ -1274,9 +1275,7 @@ printf("%s.", getarg("PUBLICFOLDERS")); }

- p=strchr(folders[i], '.'); - - list_folder(p ? p+1:folders[i]); + list_folder(p); printf("</option>\n"); } maildir_freefolders(&folders);