]> git.mxchange.org Git - mailer.git/blobdiff - inc/loader/load_cache-them.php
Re-added
[mailer.git] / inc / loader / load_cache-them.php
index 2a6e181a16272d4748fb631873c078d62797a6b1..f67cc108a525b1fc475d9b0d0d244fd09bbb45b2 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Next cached table is the referral system (themes)...
-if ($cacheInstance->cache_file("themes", true) == true) {
+if (($cacheInstance->cache_file("themes", true) == true) && ($cacheInstance->ext_version_matches("theme"))) {
        // Load referral system from cache
        global $cacheArray;
        $cache = $cacheInstance->cache_load();
@@ -64,10 +64,15 @@ if ($cacheInstance->cache_file("themes", true) == true) {
        unset($cache);
 } elseif (($_CONFIG['cache_refsys'] == "Y") && ($CSS != "1") && ($CSS != "-1")) {
        // Create cache file here
-       $cacheInstance->cache_init("themes");
+       $cacheInstance->cache_init("THEMES");
+       $cacheInstance->store_extension_version("theme");
 
        // Load all themes and their data
-       $result = SQL_QUERY("SELECT id, theme_path, theme_active, theme_ver, theme_name FROM "._MYSQL_PREFIX."_themes ORDER BY id", __FILE__, __LINE__);
+       if (GET_EXT_VERSION("theme") >= "0.0.7") {
+               $result = SQL_QUERY("SELECT id, theme_path, theme_active, theme_ver, theme_name FROM "._MYSQL_PREFIX."_themes ORDER BY id", __FILE__, __LINE__);
+       } else {
+               $result = SQL_QUERY("SELECT id, theme_path, theme_active, theme_ver FROM "._MYSQL_PREFIX."_themes ORDER BY id", __FILE__, __LINE__);
+       }
        while ($data = SQL_FETCHARRAY($result)) {
                // Add row to cache file
                $cacheInstance->add_row($data);