Summary | INBOX prefix of folder stripped in prefs |
Queue | IMP |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | slusarz (at) horde (dot) org |
Requester | imp (at) lx-soft (dot) com |
Created | 04/06/2010 (5568 days ago) |
Due | |
Updated | 04/16/2010 (5558 days ago) |
Assigned | 04/16/2010 (5558 days ago) |
Resolved | 04/16/2010 (5558 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
Everything is solved for me
Bug #8948: Fix sent-mail mbox display when switching identitieshttp://git.horde.org/diff.php/imp/js/compose.js?rt=horde-git&r1=69049e265915aa1f6a005b6631cc1bae051989ae&r2=76b9d11e4426fbe58fc31e27ed3193423b32a4c7
Bug #8948: Typohttp://git.horde.org/diff.php/imp/lib/Prefs/Identity.php?rt=horde-git&r1=5b0969a7d3fad81ae04676dc8731a70205943ec5&r2=6088ce0ba2705b74abb190964fb40428aa912467
- The prefs are stored as expected (no INBOX. prefix).
- The prefs are displayed as expected.
A last "minor" issue appears when I try to compose email:
- Before switching between identities, it displays: "Save a copy in sent-mail"
- When I switch between identities, it display: "Save a copy in
INBOX.sent-mail"
But, the mail is saved in the correct folder.
Meanwhile, there is a small typo error over there:
--- a/imp/lib/Prefs/Identity.php
+++ b/imp/lib/Prefs/Identity.php
@@ -515,7 +515,7 @@ class Imp_Prefs_Identity extends Horde_Prefs_Identity
public function setValue($key, $val, $identity = null)
{
if ($key == 'sent_mail_folder') {
- $val = IMP::folderPrefs($val, false);
+ $val = IMP::folderPref($val, false);
}
return parent::setValue($key, $val, $identity);
}
Assigned to Michael Slusarz
State ⇒ Feedback
Bug #8948: Fix namespace stripping for pref valueshttp://git.horde.org/diff.php/imp/lib/IMP.php?rt=horde-git&r1=e6a2822fd71cf145a13b4dbd52ad13035b7d8f90&r2=66a79e1de90217ec0b55c0744e86cf047e946c2b
http://git.horde.org/diff.php/imp/lib/Imap.php?rt=horde-git&r1=9f73d1ff74206b8e5d162ba79e0415027b305106&r2=66a79e1de90217ec0b55c0744e86cf047e946c2b
So, my problems are from the other side:
While debugging the source code, I found that my problem come from
IMP::folderPref('some folder', true) function.
According to a cyrus IMAP backend, this function should add a 'INBOX.'
prefix, if the folder is not INBOX, right? It's not the case...
Debugging of "IMP::folderPref('SPAM', true)":
folder = SPAM ; append = true;
def_ns = Array ( [name] => INBOX. [delimiter] => . [type] => personal
[hidden] => )
empty_ns = Array ( [name] => [delimiter] => . [type] => shared [hidden] => )
GLOBALS['imp_imap']->getNamespace(folder) = Array ( [name] =>
[delimiter] => . [type] => shared [hidden] => )
So, folder value is not changed...
I've updated to latest git today. But, the issue is still there
(cyrus IMAP backend).
Thus, I've attached a patch which solves the issue for me.
MUST be false when saving to the backend. That's the whole point of
IMP::folderPref().
Revert "
Bug #8948: Fix sent-mail selection for non-empty namespaces"This reverts commit 9d2152b7ddcc976ca796ae9801154181af3fc149.
http://git.horde.org/diff.php/imp/lib/Prefs/Ui.php?rt=horde-git&r1=c4a8bbfa852ae49c87acf4806c51b8c241af2f12&r2=055adb5538a560ebfedbf44555f5fcd64159b465
New Attachment: imp-pref-fix.patch
I've updated to latest git today. But, the issue is still there (cyrus
IMAP backend).
Thus, I've attached a patch which solves the issue for me.
But, it does not add it again to recognize Draft/Trash/SPAM/sent-mail folder:
fixed. Considering the entire options UI was rewritten in the last
few weeks, you may have fallen victim to a transient issue.
Bug #8948: Fix sent-mail selection for non-empty namespaceshttp://git.horde.org/diff.php/imp/lib/Prefs/Ui.php?rt=horde-git&r1=375ca9376b445764324b61a623a9a4b2c9fac567&r2=9d2152b7ddcc976ca796ae9801154181af3fc149
New Attachment: option_mail.PNG
So, IMP strip the "INBOX." prefix: Normal behaviour
But, it does not add it again to recognize Draft/Trash/SPAM/sent-mail folder:
When I modify "Server and Folder Information" options, It saved
correct values in database backend, but, IMP do not display (ie.
recognize) the corresponding value (see screenshot attached).
State ⇒ Not A Bug
without their namespace on purpose. See IMP::folderPref().
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ INBOX prefix of folder stripped in prefs
Type ⇒ Bug
Queue ⇒ IMP
the 'INBOX.' prefix of any folder is stripped in my prefs backend:
-------------------------------------------------------------------
: pref_uid : pref_scope : pref_name : pref_value
-------------------------------------------------------------------
: vink : imp : drafts_folder : Draft
: vink : imp : trash_folder : Trash
: vink : imp : spam_folder : SPAM
--------------------------------------------------------------------
When I add 'INBOX.' in front of these elements, these folders are
correctly recognized in the horde/imp framework.
I've same issue with identites about sent-mail folder:
When composing e-mail, imp complains of not beeing able to create
"sent-mail", but INBOX.sent-mail already exists. If I mannually edit
the corresponding prefs in my backend (ie. rewrite sent-mail to
INBOX.sent-mail), the issue is solved.