Possible trash folder selection bug & fix

Simon Cocking simon@mailguard.com.au
Fri, 11 Jan 2002 11:59:54 +1100


Hi all,

After recently setting up IMP (current CVS HEAD branch) against our 
Courier-IMAP server, I've noticed that after having manually created a 
trash folder IMP would refuse to use it, instead creating a new 
INBOX.Trash folder the first time a message was deleted.

After looking through the code, I noticed that the 
imp/templates/prefs/trashselect.inc file was missing an 
IMP::preambleString() call (which most other folder-selection routines 
were using).  Adding that fixed my problem.

Following is the patch:

--- trashselect.inc     21 Dec 2001 09:40:46 -0000      2.4
+++ trashselect.inc     11 Jan 2002 00:39:35 -0000
@@ -22,7 +22,7 @@
 <table border="0">
 <tr>
     <td><?= _("Trash folder:") ?><br />
-       <select name="trash" onchange="newFolderName();"><?= 
IMP::flistSelect(_("Create a new trash folder"), true, array('INBOX'), 
$prefs->getValue('trash_folder')) ?></select>
+       <select name="trash" onchange="newFolderName();"><?= 
IMP::flistSelect(_("Create a new trash folder"), true, array('INBOX'), 
IMP::preambleString() . $prefs->getValue('trash_folder')) ?></select>
        <input type="hidden" name="trash_new" value="" />
     </td>
 </tr></table>

-- 
Simon Cocking <simon@mailguard.com.au>
Network Operations
MailGuard Pty. Ltd.
-- 
Message protected by MailGuard: e-mail anti-virus and content filtering.
http://www.mailguard.com.au