]> git.mxchange.org Git - mailer.git/commitdiff
Fixes for extension registration
authorRoland Häder <roland@mxchange.org>
Fri, 19 Dec 2008 17:43:27 +0000 (17:43 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 19 Dec 2008 17:43:27 +0000 (17:43 +0000)
inc/databases.php
inc/extensions.php
inc/filters.php
inc/libs/cache_functions.php

index 5cff2d538ae7d70b605cfd54a4ac24f2df4e679e..e1c23e67fdbb2613cd157f5d827d1498833d5f61 100644 (file)
@@ -115,7 +115,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // Current SVN revision
-define('CURR_SVN_REVISION', "672");
+define('CURR_SVN_REVISION', "673");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index f2fd57bcceb5f75e7e005bbed93aad4a824156f8..19405263086cddc90ae61dcb3998a40df76b19f6 100644 (file)
@@ -232,7 +232,7 @@ function EXTENSION_REGISTER ($ext_name, $task_id, $dry_run = false, $logout = tr
                                        array($ext_name, $EXT_ALWAYS_ACTIVE, $EXT_VERSION), __FILE__, __LINE__);
 
                                // Remove cache file(s) if extension is active
-                               RUN_FILTER('post_extension_installed', array('ext_name' => $ext_name, 'task_id' => $task_id));
+                               RUN_FILTER('post_extension_installed', array('ext_name' => $ext_name, 'task_id' => $task_id, 'inc_pool' => $INC_POOL));
 
                                // In normal mode return a true on success
                                $ret = true;
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
index 392827f683f83953d2ebdf66529ee1023b17bc9b..e2a6d8b61ea3e48d3dffb26aad7290d825d3977f 100644 (file)
@@ -408,7 +408,7 @@ function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($data) {
        } // END - if
 
        // Return it
-       return $DATA;
+       return $data;
 }
 
 // Destroy the cache on changing admin