[imp] Filtercode (HEAD) is killing existing filterdefinitions!

Jeff Tucker jefft@wciatl.com
Mon, 12 Aug 2002 22:05:40 -0400


--On Tuesday, August 06, 2002 3:58 PM -0600 Michael M Slusarz 
<slusarz@bigworm.colorado.edu> wrote:

>
> Final note: it appears that when you register a function for shutdown,
> PHP  essentially "compiles" the function at that instant and will use
> that "compiled" function later.  Thus, if there is a class variable
> inside  of that function, that variable will be used as it appears at the
> time the  function is registered.  This appeared to be the problem in
> this case.
>
> Workaround: see my latest commit for Filter.php;  Namely, don't use a
> class  variable in the called shutdown function - use a "wrapper"
> function instead.
>
> michael
>

If this latest commit is in CVS HEAD, then I think it still doesn't work.

I have two horde/imp systems, one which was last synced to CVS HEAD around 
3 months ago, one which was synced last night. I can switch back and forth 
between them easily to test this.

Tonight I deleted all filters manually from my database. Then I logged in 
to the old IMP and added three filters. One was a Subject-based filter, 
then other to were To-based. All three moved to individual folders.

Before I logged in to the new system, my filters entry looked like this in 
the database:
a:3:{i:0;a:4:{s:6:"fields";a:1:{i:0;s:7:"subject";}s:4:"text";s:6:"DXBase";
s:6:"action";s:4:"move";s:6:"folder";s:12:"INBOX.DXBase";}i:1;a:4:{s:6:"fie
lds";a:1:{i:0;s:2:"to";}s:4:"text";s:17:"dns@list.cr.yp.to";s:6:"action";s:
4:"move";s:6:"folder";s:12:"INBOX.DJBDNS";}i:2;a:4:{s:6:"fields";a:1:{i:0;s
:2:"to";}s:4:"text";s:16:"mulberry-discuss";s:6:"action";s:4:"move";s:6:"fo
lder";s:14:"INBOX.Mulberry";}}

I know, a big mess. Hopefully it means something to you.

I logged out of the old system and logged in to the new, again CVS HEAD 
from last night. After I logged in, I looked and confirmed that I only had 
a single filter entry in my filters list. The database now looks like this:
a:2:{s:2:"bl";a:0:{}s:4:"rule";a:1:{i:0;a:3:{s:3:"flt";a:1:{i:0;a:2:{s:3:"f
ld";a:1:{i:0;s:7:"subject";}s:3:"txt";a:1:{i:0;s:6:"DXBase";}}}s:3:"act";i:
2;s:3:"fol";s:12:"INBOX.DXBase";}}}

I'll be glad to help out or test in any way I can. Any ideas?

Jeff

-- 
Jeff Tucker
Williams Consulting, Inc.
jefft@wciatl.com