[imp] delete sent-mail task does not work with non english language
Marchand Robert
robert.marchand at umontreal.ca
Mon Jun 16 13:18:31 PDT 2003
Hi,
I've found that the task delete_sentmail_monthly will not sort right the sent-mail folders if using a non English language. With IMP 3.2.1, the month are now renamed with month number but the delete task still assume a word base specification:
[lib/Maintenance/Task/delete_sentmail_monthly.php]
...
$folder_array[$k] = strtotime("$regs[1] 1, $regs[2]");
...
With sentmail-feb-2003 this would give: strtotime("feb 1, 2003") which is OK,
but with sentmail-02-2003 this will give: strtotime("02 1, 2003") which returns -1.
To make it work, I've changed it to:
$folder_array[$k] = strtotime("$regs[2]/$regs[1]/1");
which give strtotime("2003/02/1") with sentmail-02-2003.
To support both way one could do the same thing as in rename_sentmail_monthly:
global $language
if (($language == 'en_US') || ($language == 'en_GB')) {
$folder_array[$k] = strtotime("$regs[1] 1, $regs[2]");
} else {
$folder_array[$k] = strtotime("$regs[2]/$regs[1]/1");
}
In case others do not have this problem, my tests were with IMP 3.2.1, Horde 2.2.3, PHP 4.3.2 on a SGI IRIX System.
Thanks.
More information about the imp
mailing list