[dev] Question regarding IMP_Maillog

Michael J Rubinsky mrubinsk at horde.org
Tue Mar 19 21:31:36 UTC 2013


ActiveSync 14.0 adds support for synchronizing message reply/forward  
state. In trying to implement this, I've come across an issue with the  
way IMP_Maillog stores the guid of the email. In every other  
application in Horde, history guids are build with ':' delimiting the  
various parts of the guid. This makes it possible to search for all  
entries that have changed within only a specific application, for a  
specific user or resource. In kronolith, E.g, the guids are  
'kronolith:share_id:event_id'.

According to the phpdoc for Horde_History::getByTimestamp(), the ':'  
delimiter is part of the API:

      * @param string  $parent  The parent history to start searching at. If
      *                         non-empty, will be searched for with a LIKE
      *                         '$parent:%' clause.


In IMP_Maillog, however, the ids are build using '.' as the delimiter.  
Due to this, it's impossible for me to use the History API to obtain  
all entries that have been added since the last sync:

$history->getByTimeStamp('<', $ts, array(), 'imp.mike');

will fail since the history library appends the ':' delimter  
automatically. I can't hack around it using the $query parameter  
either, since those fields only work with the 'history_' fields in the  
SQL backend.

Is there a technical reason for this? I had thought it might be  
because the Message-ID can contain ':' characters - but then it can  
also contain '.'. Is this something that can be changed in  
IMP_Maillog, or should I extend Horde_History to allow specifying the  
delimter to be used in the ::getByTimeStamp() method?
-- 
mike

The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6062 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.horde.org/archives/dev/attachments/20130319/823e374f/attachment-0001.bin>


More information about the dev mailing list