[pLog-svn] r3251 - plog/trunk/class/security

Jon Daley plogworld at jon.limedaley.com
Mon Apr 17 02:18:41 GMT 2006


 	Naive question: I understand the part about filters that already 
ran should run again, but is the desired behavior that filters that have 
not run yet should be run, or not at all?  I am not sure what the code 
currently does, or if this addition changes that behavior.

On Sun, 16 Apr 2006, pwestbro at devel.lifetype.net wrote:
> Author: pwestbro
> Date: 2006-04-16 03:22:26 +0000 (Sun, 16 Apr 2006)
> New Revision: 3251
>
> Modified:
>   plog/trunk/class/security/pipeline.class.php
> Log:
> Fix to pipeline where if one of the pipeline filters returns false, not all of the pipelines filters get run to clean up.  Only the filters that ran will get called to clean up
>
> Modified: plog/trunk/class/security/pipeline.class.php
> ===================================================================
> --- plog/trunk/class/security/pipeline.class.php	2006-04-15 10:44:44 UTC (rev 3250)
> +++ plog/trunk/class/security/pipeline.class.php	2006-04-16 03:22:26 UTC (rev 3251)
> @@ -134,6 +134,7 @@
>             // Assume that this will be successful
>             $this->_result = new PipelineResult( true );
>
> +            $numPipelinesRun = 0;
>             // if enabled, then check all the filters
>             foreach( $_pLogPipelineRegisteredFilters as $filterClass ) {
>                 // create an instance of the filter
> @@ -152,6 +153,7 @@
>                     // break out of this loop
>                     break;
>                 }
> +                $numPipelinesRun++;
>             }
>
>             // If one of the filters returns that this was not a valid result
> @@ -162,6 +164,12 @@
>                 // want to do (i.e. report ip address to dns blacklist)
>
>                 foreach( $_pLogPipelineRegisteredFilters as $filterClass ) {
> +                    if( $numPipelinesRun-- <= 0 )
> +                    {
> +                        // We have run all of the pipelines in the initial loop
> +                        break;
> +                    }
> +
>                     // create an instance of the filter
>                     $pipelineRequest = new PipelineRequest( $this->_httpRequest,
>                                                             $this->_blogInfo,
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>

**************************************
Jon Daley
http://jon.limedaley.com/

Friendship is the inexpressible comfort of feeling safe with
a person having neither to weigh thoughts nor measure words.
-- George Eliot


More information about the pLog-svn mailing list