[pLog-svn] r6088 - plog/branches/lifetype-1.2/class/security
markplace at gmail.com
Thu Nov 29 09:36:48 EST 2007
HI Jon & Oscar:
Just try to revert to 6087, and give it a test!
When bayesian filter marked one comment as spam, it will add two comment
records into db.
That's why I say the pipeline always run twice.
Take the defualt filters as example , there are 3 filters
The $pipeline->process() will run these 3 filter one by one...
in 1st run:
NullFilter->CommentFilter->BayesianFilter(Failed), then it break.
in 2nd run:
NullFilter->CommentFilter->BayesianFilter(Failed), won't break .....
For the time being, we don't think this is a problem, becasue we just "HIDE"
Take the authimage "deleteFile" for example, I put @ in front of unlink and
ignore the error message, becasue we have no idea why filters run twice.
So, I just combine these two runs into one, and make sure each "filter" run
once. Why I can make sure ... Becasue I did not use "break" to break the
for-loop, I just let it go through all filters.
* If some filters fails, I just keep the first failed result into
* If no filters fails, I just keep the last filter result into
It is exactly the old way does.
> -----Original Message-----
> From: plog-svn-bounces at devel.lifetype.net
> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Jon Daley
> Sent: Thursday, November 29, 2007 10:18 PM
> To: LifeType Developer List
> Subject: Re: [pLog-svn] r6088 -
> On Thu, 29 Nov 2007, Mark Wu wrote:
> >> Well, hopefully Paul will chime in here. I am pretty sure I
> >> understand what you did. Did you read Paul's (I assume it
> was Paul)
> >> comment about why he added the second loop? I think we
> need to run
> >> the entire pipeline twice, particularly those filters that ran the
> >> first time.
> > Yep, I read his comments about add second run , that why I
> think the
> > change is okay for us. Becasue I can make sure all pipeline filters
> > run once. No more no less :D
> I don't understand, if plugin A runs and trains the
> comment as non-spam, and then plugin B runs and trains as
> spam, in the two-run method, plugin A would get run again and
> be able to clean up his bad train of the comment.
> Your method doesn't allow for that, correct?
> >> The thing that we need to have is the "executed" flag
> passed into
> >> each filter, and then each filter can decide whether it
> wants to run
> >> twice or not.
> > Yes, this is what I did in rev. 6088.
> Hrm, I'll guess I'll have to look more into the code.
> Plugins never run twice in your new method, so what you just
> said is incorrect?
> > BTW, did you test it yet? Does it work for you?
> I don't use any plugins that would require the
> functionality that Paul added. I don't expect it broke
> anything that I do, since I only use hidden input. Only
> running once restricts what plugins can do, and depending on
> what letter they start with, depends on if they run in the
> correct order or not.
> Jon Daley
> As computer scientists, we don't like to think that we're fools.
> We like to think we are better than that.
> -- Professor Tygar
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
More information about the pLog-svn