[Svn] [Fwd: Re: r2339]

Thomas Bruederli roundcube at gmail.com
Tue Mar 10 16:06:58 CET 2009


FYI.

-------- Original Message --------
From: richs at whidbey.net
Subject: Re: [Svn] r2339
To: Thomas Bruederli <roundcube at gmail.com>

Hi Thomas,

It's been a while since I worked with Roundcube, so I've been playing
catchup on all the new code.  I didn't come across the action matching
initially and it's true that it was probably finding the include without
the change.

The actual problem was using "RECENT" for the test, and then "UNSEEN"
for the actual count.  There are cases under Dovecot IMAP when these two
will be different, and Roundcube was not updating the message count on a
check-recent action.  Making that change fixed Dovecot compatibility.

Rich

Thomas Bruederli wrote:
> A.L.E.C wrote:
>> trac at roundcube.net wrote:
>>> Author: richs
>>> Modified: trunk/roundcubemail/index.php
>>> ===================================================================
>>> --- trunk/roundcubemail/index.php    2009-03-09 21:02:39 UTC (rev 2338)
>>> +++ trunk/roundcubemail/index.php    2009-03-09 21:03:10 UTC (rev 2339)
>>> @@ -183,6 +183,7 @@
>>>       'remove-attachment'  =>  'attachments.inc',
>>>       'display-attachment' =>  'attachments.inc',
>>>       'upload' =>  'attachments.inc',
>>> +    'check-recent' =>  'check_recent.inc',
>>>     ),
>>
>> This is not required, because we have this:
>>
>> $stepfile = !empty($action_map[$RCMAIL->task][$RCMAIL->action]) ?
>>       $action_map[$RCMAIL->task][$RCMAIL->action] :
>> strtr($RCMAIL->action, '-', '_') . '.inc';
>
> Right, this is not required.
> Rich, did you see any occasions where the step file wasn't included?
>>
>>
>>> Modified: trunk/roundcubemail/program/steps/mail/check_recent.inc
>>> ===================================================================
>>> --- trunk/roundcubemail/program/steps/mail/check_recent.inc
>>> 2009-03-09 21:02:39 UTC (rev 2338)
>>> +++ trunk/roundcubemail/program/steps/mail/check_recent.inc
>>> 2009-03-09 21:03:10 UTC (rev 2339)
>>> @@ -66,7 +66,7 @@
>>>         }
>>>       }
>>>     }
>>> -  else if ($IMAP->messagecount($mbox_name, 'RECENT', $check_all)) {
>>> +  else if ($IMAP->messagecount($mbox_name, 'UNSEEN', $check_all)) {
>>>       $OUTPUT->command('set_unread_count', $mbox_name,
>>> $IMAP->messagecount($mbox_name, 'UNSEEN', $check_all));
>>>     }
>>
> Actually this shouldn't change the behavior but it causes some more
> updates. Also the return value of $IMAP->messagecount() could be saved
> in a variable instead of calling this a second time (performance!).
>
> What was your intention to change this?
>
> ~Thomas
>
>
_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list