Fixes for filter 'load_includes'
[mailer.git] / inc / filters.php
index d582202ac6a02ac4297ec79673b0d6897687e6af..82f9dcb27ac6fd26cf9ab596e6a2160eb4e1417c 100644 (file)
@@ -387,14 +387,14 @@ function FILTER_SOLVE_TASK ($data) {
 }
 
 // Filter to load include files
-function FILTER_LOAD_INCLUDES ($data) {
-       global $INC_POOL, $CSS;
+function FILTER_LOAD_INCLUDES ($INC_POOL) {
+       global $CSS;
 
        // Is it an array?
        if ((!isset($INC_POOL)) || (!is_array($INC_POOL))) {
                // Then abort here
                DEBUG_LOG(__FILE__, __LINE__, "INC_POOL is no array!");
-               return $data;
+               return;
        } // END - if
 
        // Check for added include files
@@ -404,12 +404,9 @@ function FILTER_LOAD_INCLUDES ($data) {
                        require_once($fqfn);
                } // END - foreach
 
-               // Remove array
-               unset($INC_POOL);
+               // Reset array
+               $INC_POOL = array();
        } // END - if
-
-       // Return $data
-       return $data;
 }
 
 // Filter for running SQL commands