]> git.mxchange.org Git - mailer.git/blobdiff - inc/filters.php
Fixes for extension registration
[mailer.git] / inc / filters.php
index 16b5020e5a82ad002f1048928cc3c3ac82c5cc4f..a870aa199b64b11f74d1085eac428a3ae0efae79 100644 (file)
@@ -390,23 +390,32 @@ function FILTER_SOLVE_TASK ($data) {
 function FILTER_LOAD_INCLUDES ($data) {
        global $CSS;
 
+       // Default is $data as inclusion list
+       $INC_POOL = $data;
+
        // Is it an array?
        if ((!isset($data)) || (!is_array($data))) {
                // Then abort here
                DEBUG_LOG(__FILE__, __LINE__, "INC_POOL is no array!");
-               return;
-       } // END - if
+               return $data;
+       } elseif (isset($data['inc_pool'])) {
+               // Use this as new inclusion pool!
+               $INC_POOL = $data['inc_pool'];
+       }
 
        // Check for added include files
-       if (count($data) > 0) {
+       if (count($INC_POOL) > 0) {
                // Loads every include file
-               foreach ($data as $FQFN) {
+               foreach ($INC_POOL as $FQFN) {
                        require_once($FQFN);
                } // END - foreach
 
                // Reset array
-               $data = array();
+               if (isset($data['inc_pool'])) $data['inc_pool'] = array();
        } // END - if
+
+       // Continue with processing
+       return $data;
 }
 
 // Filter for running SQL commands