Fixes for filter 'load_includes'
authorRoland Häder <roland@mxchange.org>
Fri, 19 Dec 2008 17:25:03 +0000 (17:25 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 19 Dec 2008 17:25:03 +0000 (17:25 +0000)
inc/autopurge.php
inc/check-reset.php
inc/databases.php
inc/extensions.php
inc/filters.php
inc/load_cache.php
inc/load_extensions.php
inc/pool-update.php

index c3a206f..75bddcd 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
 $INC_POOL = GET_DIR_AS_ARRAY(PATH."inc/autopurge/", "purge-");
 
 // Run the filter
-RUN_FILTER('load_includes');
+RUN_FILTER('load_includes', $INC_POOL);
 
 // Run filters for extra autopurge
 RUN_FILTER('extra_autopurge');
index cf6c67c..88335c1 100644 (file)
@@ -47,7 +47,7 @@ if ((date("d", getConfig('last_update')) != date("d", time())) && ((!defined('mx
        $INC_POOL = RESET_ADD_INCLUDES();
 
        // Run the filter
-       RUN_FILTER('load_includes');
+       RUN_FILTER('load_includes', $INC_POOL);
 } // END - if
 
 //
index 7c50726..3bb3fe2 100644 (file)
@@ -115,7 +115,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // Current SVN revision
-define('CURR_SVN_REVISION', "669");
+define('CURR_SVN_REVISION', "670");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index ccd38d9..f2fd57b 100644 (file)
@@ -486,7 +486,7 @@ function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) {
                // In real-mode execute any existing includes
                if (!$dry_run) {
                        $cacheArray['inc_pool'][$ext_name] = $INC_POOL;
-                       RUN_FILTER('load_includes');
+                       RUN_FILTER('load_includes', $INC_POOL);
                        $INC_POOL = $cacheArray['inc_pool'][$ext_name];
                        unset($cacheArray['inc_pool'][$ext_name]);
                } // END - if
index d582202..82f9dcb 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
index 3039a40..4e849ba 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
 $INC_POOL = GET_DIR_AS_ARRAY(PATH."inc/loader/", "load_cache-");
 
 // Run the filter
-RUN_FILTER('load_includes');
+RUN_FILTER('load_includes', $INC_POOL);
 
 //
 ?>
index 7ec8ecc..fae66b3 100644 (file)
@@ -263,7 +263,7 @@ if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($cacheMode == "init") && ($CSS != "1")
 } // END - if
 
 // Run the filter
-RUN_FILTER('load_includes');
+RUN_FILTER('load_includes', $INC_POOL);
 
 // Uninstall extensions that are no longer in our system
 if (!empty($DEL[0])) {
index b2fd7c8..3225668 100644 (file)
@@ -50,7 +50,7 @@ $GLOBALS['pool_cnt'] = 0;
 $INC_POOL = GET_DIR_AS_ARRAY(PATH."inc/pool/", "pool-");
 
 // Run the filter
-RUN_FILTER('load_includes');
+RUN_FILTER('load_includes', $INC_POOL);
 
 // Remove counter again
 unset($GLOBALS['pool_cnt']);