More fixes applied from profi-conecpt, cache system rewritten: now all cache files...
[mailer.git] / inc / loader / load_cache-modreg.php
index ed6797493d6bd3e873241e504632ee60c31e7ca8..126888ba9bfe80cee68e7fb33c46b0127b6fcedb 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Next cached table is the module registry (mod_reg)...
-if ($cacheInstance->cache_file("mod_reg", true) == true) {
+if (($cacheInstance->cache_file("mod_reg")) && ($cacheInstance->ext_version_matches("sql_patches"))) {
        // Load cache
        global $cacheArray;
        $cacheArray['modules'] = $cacheInstance->cache_load();
@@ -67,6 +67,7 @@ if ($cacheInstance->cache_file("mod_reg", true) == true) {
 } elseif (($_CONFIG['cache_modreg'] == "Y") && ($CSS != "1") && ($CSS != "-1")) {
        // Create cache file here
        $cacheInstance->cache_init("MODULES");
+       $cacheInstance->store_extension_version("sql_patches");
 
        // Load all modules and their data
        if (GET_EXT_VERSION("sql_patches") >= "0.3.6") {