[#7862] ContactAutoCompleter calls non-existent private MIME::_rfc822Encode
Summary ContactAutoCompleter calls non-existent private MIME::_rfc822Encode
Queue Kronolith
Queue Version 2.3
Type Bug
State Resolved
Priority 1. Low
Owners Horde Developers, chuck@horde.org
Requester mrubinsk@horde.org
Created 2009-01-16 (4186 days ago)
Updated 2009-01-18 (4184 days ago)
Resolved 2009-01-18 (4184 days ago)
Patch No

Michael Rubinsky <mrubinsk@horde.org> 2009-01-16 23:40:52
The private method MIME::_rfc822Encode() is called directly from 
kronolith's ContacatAutoCompleter.php file.  That method was renamed 
to _rfc2822Encode() and then made public (renamed to rfc2822Encode()) 
in MIME.php

The function signature has also changed, and now no longer takes a 
'filter' argument, but a 'type' argument in it's place.

This is a sort-of BC break in that the function was changed in MIME, 
but kronolith should not have been calling a private method on MIME 

Chuck Hagenbuch <chuck@horde.org> 2009-01-17 05:11:21
Following the changelog, this is a BC break for Kronolith with Horde 3.3+

Chuck Hagenbuch <chuck@horde.org> 2009-01-17 05:12:06
... and it also affects Whups 1.0.

Chuck Hagenbuch <chuck@horde.org> 2009-01-17 05:18:24
Continuing my piecemeal analysis, in FW3, the method is still private, 
and called _rfc2822Encode. I *think* what we should do is:

- change the calls in the HEAD apps to use the public rfc2822Encode 
function and new 2nd parameter

- re-add the original _rfc822Encode function to MIME.php in FW3 for 
backwards compatibility with old code.

Any objections or better ideas?

Michael Rubinsky <mrubinsk@horde.org> 2009-01-17 17:12:52
That sounds reasonable, though I still have a nagging voice in my head 
about client code calling a private method. I guess since FW_3 is 
really only being maintained for bugs at this point though, I guess 
there's not much worth in adding a public method for any possible 
future FW_3 releases as well.

Chuck Hagenbuch <chuck@horde.org> 2009-01-17 17:27:48
Right - and we can't change it now because that'll just create more BC 
problems with older Horde versions.

Michael Rubinsky <mrubinsk@horde.org> 2009-01-17 18:59:12
Another related issue is that the class variable 'rfc822_filter' has 
been removed from MIME.php as well.  This needs to be added back for 
BC reasons, as it is also used (at least) in ContactAutoCompleter.php

CVS Commit <cvs@lists.horde.org> 2009-01-18 03:35:16

Chuck Hagenbuch <chuck@horde.org> 2009-01-18 03:40:40
BC in fw3 should be restored now.