Jump to content
  • Beta 1 - pruneipaddresses task doesn't appear to clean up all IP addresses


    Nathan Explosion
    • Status: Moved to Github

    The task calls

    Member::pruneAllLoggedIpAddresses( $time );

    Within that function, the following is the last thing performed:

    foreach ( Application::allExtensions( 'core', 'pruneIpAddresses', FALSE, 'core' ) as $key => $extension )
    {
    	$extension->pruneIpAddresses( $time );
    }

    This will not run the pruneIpAddresses function in any extensions, as the relevant extension is NOT pruneIpAddresses but is IpAddresses


    User Feedback

    Recommended Comments

    From the v4 function:

    foreach ( \IPS\Application::allExtensions( 'core', 'IpAddresses', FALSE, 'core' ) as $key => $extension ){
    	if( method_exists( $extension, 'pruneIpAddresses')){
    		$extension->pruneIpAddresses( $time );
    	}
    }

    From the v5 function - I think this will also cause the task to fail if the IpAddress extension doesn't have a pruneIpAddresses function:

    foreach ( Application::allExtensions( 'core', 'pruneIpAddresses', FALSE, 'core' ) as $key => $extension ){
    	$extension->pruneIpAddresses( $time );
    }

     

    Link to comment
    Share on other sites


×
×
  • Create New...