[pLog-svn] r3251 - plog/trunk/class/security
pwestbro at devel.lifetype.net
pwestbro at devel.lifetype.net
Sun Apr 16 03:22:27 GMT 2006
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,
More information about the pLog-svn
mailing list