[Tickets #10098] Re: save_sent_mail pref gets corrupted

bugs at horde.org bugs at horde.org
Tue Aug 23 14:08:03 UTC 2011


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/10098
------------------------------------------------------------------------------
  Ticket             | 10098
  Updated By         | rsalmon at mbpgroup.com
  Summary            | save_sent_mail pref gets corrupted
  Queue              | IMP
  Version            | Git master
  Type               | Bug
  State              | Feedback
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             | Michael Slusarz
------------------------------------------------------------------------------


rsalmon at mbpgroup.com (2011-08-23 14:08) wrote:

>>> Maybe this commit will help - it will do sanity checking on saved
>>> identities data.
>>
>> no, this is worth. I don't get any Sent folder now.
>
> Now I am just convinced that your PHP is just badly broken.  As  
> previously mentioned, there is only **ONE** place where we set the  
> value of sent_mail_folder -> in IMP_Prefs_Identity::setValue().  If  
> we are saving the 'sent_mail_folder' key, the value is ALWAYS passed  
> through IMP_Mailbox::prefTo($val).  IMP_Mailbox::prefTo() ALWAYS  
> returns a string:
>
>         if (($ns = self::get($mbox)->namespace_info) !== null) {
>              if ($ns['name'] == $def_ns['name']) {
>                  /* From personal namespace => strip namespace. */
>                  return substr(strval($mbox),  
> strlen($def_ns['name'])); // STRING RETURN
>              } elseif ($ns['name'] == $empty_ns['name']) {
>                  /* From empty namespace => prefix with delimiter. */
>                  return $empty_ns['delimiter'] . strval($mbox); //  
> STRING RETURN
>              }
>          }
>
>         return strval($mbox);  // STRING RETURN
>
> You will have to figure out exactly why this isn't working on your  
> system, or I am going to mark this bug bogus (because nobody else  
> can reproduce).


I've updated php to version 5.3.7 and git this morning. Now, if horde  
pref $_prefs['default_identity']['locked'] is set to false, all seamed  
to be working Ok.

if $_prefs['default_identity']['locked'] is set to true. I don't get a  
Sent folder.
I've added some logging  in /imp/lib/Prefs/Identity.php
     public function getValue($key, $identity = null)
     {
         $val = parent::getValue($key, $identity);
         switch ($key) {
         case 'sent_mail_folder':
             if (is_string($val) === false)  
{horde::logMessage("7777777777777 '$val' " . print_r($val,true));}
             return (is_string($val) && strlen($val))
                 ? IMP_Mailbox::get(IMP_Mailbox::prefFrom($val))
                 : null;

...

here is the ouput :
2011-08-23T15:54:25+02:00 INFO: HORDE [imp] 7777777777777 'INBOX.Sent'  
IMP_Mailbox Object
(
     [cache] => Array
         (
         )

     [changed] => 0
     [_mbox:protected] => INBOX.Sent
)
2011-08-23T15:54:33+02:00 INFO: HORDE [imp] 7777777777777 'INBOX.Sent'  
IMP_Mailbox Object
(
     [cache] => Array
         (
             [n] => Array
                 (
                     [0] => .
                     [2] => INBOX.
                     [4] => 1
                 )

             [d] => Sent
         )

     [changed] => 0
     [_mbox:protected] => INBOX.Sent
)













More information about the bugs mailing list