| Summary | Creating a new folder for spam doesn't work |
| Queue | Ingo |
| Queue Version | 1.2-RC2 |
| Type | Bug |
| State | Resolved |
| Priority | 2. Medium |
| Owners | Chuck Hagenbuch <chuck (at) horde (dot) org> |
| Requester | janne (dot) peltonen (at) helsinki (dot) fi |
| Created | 04/23/2008 (18 days ago) |
| Due | |
| Updated | 04/25/2008 (16 days ago) |
| Assigned | 04/24/2008 (17 days ago) |
| Resolved | 04/25/2008 (16 days ago) |
| Attachments | |
| Milestone | |
| Patch |
State ⇒ Resolved
Assigned to Chuck Hagenbuch
Thanks for your quick feedback!This one appears to work. Thanks for replying so fast. :)Okay, another try:
http://cvs.horde.org/diff.php?r1=1.15&r2=1.16&f=ingo%2Fspam.php
(I don't have this set up, sorry for the trial-and-error)
> Can you try this patch, please?
> http://cvs.horde.org/diff.php?r1=1.14&r2=1.15&f=ingo%2Fspam.php
Now I can successfully create a new folder, but it doesn't end up as the spam folder (the script only creates the new folder). Moreover, if I try to select the newly created folder as the spam folder immediately after creating it this way, I get an error such as 'WarningThe folder "maym" already exists' (and the spam folder isn't changed). Same if I try to select the folder again directly after getting the error. If I return to the rules list, go back to spam.php and then select my new folder as the spam folder, it works OK.
State ⇒ Feedback
Can you try this patch, please?http://cvs.horde.org/diff.php?r1=1.14&r2=1.15&f=ingo%2Fspam.php
Patch ⇒
Milestone ⇒
Queue ⇒ Ingo
Summary ⇒ Creating a new folder for spam doesn't work
Type ⇒ Bug
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Creating a new folder for spam does not work. If I select the option for creating a new folder in ingo/spam.php, I get the window asking for the name of the spam folder OK, the script gets activated - with an empty string as the argument to fileinto, and with no new folder created on the imap server. Tracing the error in ingo/spam.php, I found something weird in the if-elsif-construction in lines 81-122. Apparently, the new spam folder gets created and set as the spam folder only in case the test $form->validate($vars) in line 82 fails. But if the script is handling the form request created by the new_folder.js javascript, the test succeeds, and $spam->setSpamFolder($vars->get('folder')) (line 83) sets the spam folder to the value of 'folder' - i.e., an empty string.
Apparently, the validate() method should return false if all required variables aren't set. But it appears to be ok for the method that the variables are (implicitely) empty...