From 323f6a7c78424b654b62b69eeb44995908a5327e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 19 Dec 2008 17:57:47 +0000 Subject: [PATCH] Final fixes for 'loading cache vs. filters vs. extensions' construct --- inc/databases.php | 2 +- inc/filters.php | 2 +- inc/load_extensions.php | 12 +++++++++--- inc/loader/load_cache-admin.php | 3 +++ inc/loader/load_cache-config.php | 3 +++ inc/loader/load_cache-modreg.php | 3 +++ inc/loader/load_cache-refdepths.php | 3 +++ inc/loader/load_cache-refsystem.php | 3 +++ inc/loader/load_cache-them.php | 3 +++ 9 files changed, 29 insertions(+), 5 deletions(-) diff --git a/inc/databases.php b/inc/databases.php index e1c23e67fd..90e7918eaf 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -115,7 +115,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // Current SVN revision -define('CURR_SVN_REVISION', "673"); +define('CURR_SVN_REVISION', "674"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/filters.php b/inc/filters.php index a870aa199b..0fc19fa552 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -211,7 +211,7 @@ function RUN_FILTER ($filterName, $data = null, $silentAbort = true) { // Then run all filters foreach ($filters[$filterName] as $filterFunction=>$active) { // Debug message - //* DEBUG: */ echo __FUNCTION__."(".__LINE__."): name={$filterName}, func={$filterFunction}, active={$active}
\n"; + //* DEBUG: */ echo __FUNCTION__."(".__LINE__."): name={$filterName},func={$filterFunction},active={$active}
\n"; // Is the filter active? if ($active == "Y") { diff --git a/inc/load_extensions.php b/inc/load_extensions.php index fae66b3b56..bb161afa63 100644 --- a/inc/load_extensions.php +++ b/inc/load_extensions.php @@ -154,14 +154,17 @@ if ($cacheMode == "load") { // No database load needed $res_ext_crt = false; - // Load more cache files (like admins) - require_once(PATH."inc/load_cache.php"); - // Load all extension files foreach ($EXT_POOL as $ext) { LOAD_EXTENSION($ext); } // END - foreach + // Init filter system + INIT_FILTER_SYSTEM(); + + // Load more cache files (like admins) + require_once(PATH."inc/load_cache.php"); + // Remove array unset($EXT_POOL); } else { @@ -250,6 +253,9 @@ if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($cacheMode == "init") && ($CSS != "1") } } // END - while + // Init filter system + INIT_FILTER_SYSTEM(); + if ($cacheMode == "init") { // Close cache file $cacheInstance->finalize(); diff --git a/inc/loader/load_cache-admin.php b/inc/loader/load_cache-admin.php index 9dd80220d7..48e7c90f60 100644 --- a/inc/loader/load_cache-admin.php +++ b/inc/loader/load_cache-admin.php @@ -37,6 +37,9 @@ if (!defined('__SECURITY')) { require($INC); } // END - if +// Make cacheInstance global +global $cacheInstance; + // Let's start with the admins table... if (($cacheInstance->loadCacheFile("admins")) && ($cacheInstance->extensionVersionMatches("admins"))) { // Load cache diff --git a/inc/loader/load_cache-config.php b/inc/loader/load_cache-config.php index d7da6fd7d0..dc7bc67c4e 100644 --- a/inc/loader/load_cache-config.php +++ b/inc/loader/load_cache-config.php @@ -37,6 +37,9 @@ if (!defined('__SECURITY')) { require($INC); } +// Make cacheInstance global +global $cacheInstance; + // Next cached table is the configuration (config)... if (($cacheInstance->loadCacheFile("config", true)) && ($cacheInstance->extensionVersionMatches("sql_patches"))) { // Load config from cache diff --git a/inc/loader/load_cache-modreg.php b/inc/loader/load_cache-modreg.php index 5d5196efdd..4b5624dec1 100644 --- a/inc/loader/load_cache-modreg.php +++ b/inc/loader/load_cache-modreg.php @@ -37,6 +37,9 @@ if (!defined('__SECURITY')) { require($INC); } +// Make cacheInstance global +global $cacheInstance; + // Next cached table is the module registry (mod_reg)... if (($cacheInstance->loadCacheFile("mod_reg")) && ($cacheInstance->extensionVersionMatches("sql_patches"))) { // Load cache diff --git a/inc/loader/load_cache-refdepths.php b/inc/loader/load_cache-refdepths.php index 1cd352bc02..11a47438ae 100644 --- a/inc/loader/load_cache-refdepths.php +++ b/inc/loader/load_cache-refdepths.php @@ -37,6 +37,9 @@ if (!defined('__SECURITY')) { require($INC); } +// Make cacheInstance global +global $cacheInstance; + // Next cached table is the referal system (refdepths)... if (($cacheInstance->loadCacheFile("refdepths")) && ($cacheInstance->extensionVersionMatches("sql_patches"))) { // Load referal system from cache diff --git a/inc/loader/load_cache-refsystem.php b/inc/loader/load_cache-refsystem.php index c44c9d6d13..4c175223c4 100644 --- a/inc/loader/load_cache-refsystem.php +++ b/inc/loader/load_cache-refsystem.php @@ -37,6 +37,9 @@ if (!defined('__SECURITY')) { require($INC); } +// Make cacheInstance global +global $cacheInstance; + // Next cached table is the referal system (refsystem)... if (($cacheInstance->loadCacheFile("refsystem")) && ($cacheInstance->extensionVersionMatches("sql_patches"))) { // Load referal system from cache diff --git a/inc/loader/load_cache-them.php b/inc/loader/load_cache-them.php index fd3b2a3982..673d82693c 100644 --- a/inc/loader/load_cache-them.php +++ b/inc/loader/load_cache-them.php @@ -40,6 +40,9 @@ if (!defined('__SECURITY')) { return false; } +// Make cacheInstance global +global $cacheInstance; + // Next cached table is the referal system (themes)... if (($cacheInstance->loadCacheFile("themes")) && ($cacheInstance->extensionVersionMatches("theme"))) { // Load referal system from cache -- 2.39.2