[#6775] Creating a /new/ spam folder results in a setting without the correct namespace prefix
Summary Creating a /new/ spam folder results in a setting without the correct namespace prefix
Queue Ingo
Queue Version 1.2
Type Bug
State Duplicate
Priority 2. Medium
Owners
Requester janne (dot) peltonen (at) helsinki (dot) fi
Created 05/29/2008 (84 days ago)
Due
Updated 06/26/2008 (56 days ago)
Assigned
Resolved 06/26/2008 (56 days ago)
Attachments
Milestone
Patch No

History
06/26/2008 Jan Schneider State ⇒ Duplicate
 
05/29/2008 Chuck Hagenbuch Comment #2 Reply to this comment
Ingo can't call IMP functions directly, period.
05/29/2008 Chuck Hagenbuch Deleted Attachment: ingo_new_spam_folder_creation_append_namespace.patch
 
05/29/2008 janne (dot) peltonen (at) helsinki (dot) fi Comment #1
New Attachment: ingo_new_spam_folder_creation_append_namespace.patch
Patch ⇒
Milestone ⇒
Queue ⇒ Ingo
Summary ⇒ Creating a /new/ spam folder results in a setting without the correct namespace prefix
Type ⇒ Bug
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Reply to this comment
OK, what really appeared to be wrong was that when creating a new 
folder for spam, then the spam->folder setting (and the created 
script) ends up without the namespace prefix. What happened was that 
the new folder was created using Ingo::createFolder()'s result, which 
doesn't contain the namespace part in any case. This also explains 
why, when I created a new folder and the script got activated OK and 
the newly created folder ended up in the drop down menu of spam.php, 
it wasn't selected in the menu: spam.php realoads the folder from the 
server and gets, for instance, INBOX.newspamfolder, but the default 
value of the menu ends up as newspamfolder...

I fixed the problem locally by adding a line that calls 
IMP::appendNamespace($result) into spam.php... I don't know whether 
this is an optimal solution, maybe it'd be better to give the 
mail/createFolder function a new parameter that tells whether to 
return the result with or without the namespace prefix?