X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Floader%2Fload_cache-refsystem.php;h=dc6fa299f1b14c5b312f91fc7e8c08b9a08f6a49;hb=67252a132056473fd93647f32e9f70202df4cdd1;hp=b65764680e50f8af4a8ac584e6f35d22c412c398;hpb=397eb5dee2611cfaa1ff494d73e6785b88109cd6;p=mailer.git diff --git a/inc/loader/load_cache-refsystem.php b/inc/loader/load_cache-refsystem.php index b65764680e..dc6fa299f1 100644 --- a/inc/loader/load_cache-refsystem.php +++ b/inc/loader/load_cache-refsystem.php @@ -1,7 +1,7 @@ loadCacheFile("refsystem")) && ($cacheInstance->extensionVersionMatches("sql_patches"))) { +if (($GLOBALS['cache_instance']->loadCacheFile('refsystem')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { // Load referal system from cache - global $cacheArray; - $cacheArray['refsystem'] = $cacheInstance->getArrayFromCache(); -} elseif ((getConfig('cache_refsys') == "Y") && ($CSS != "1") && ($CSS != "-1")) { + $GLOBALS['cache_array']['refsystem'] = $GLOBALS['cache_instance']->getArrayFromCache(); +} elseif (getOutputMode() != 1) { // Create cache file here - $cacheInstance->init("REFSYSTEM"); - $cacheInstance->storeExtensionVersion("sql_patches"); + $GLOBALS['cache_instance']->init(); // Load all modules and their data - $result = SQL_QUERY("SELECT id, userid, level, counter FROM `{!_MYSQL_PREFIX!}_refsystem` ORDER BY userid, level", __FILE__, __LINE__); - while ($data = SQL_FETCHARRAY($result)) { + $result = SQL_QUERY('SELECT id, userid, level, counter FROM `{?_MYSQL_PREFIX?}_refsystem` ORDER BY userid, level', __FILE__, __LINE__); + while ($content = SQL_FETCHARRAY($result)) { // Add row to cache file - $cacheInstance->addRow($data); + $GLOBALS['cache_instance']->addRow($content); } // END - while // Free memory SQL_FREERESULT($result); // Close the cache - $cacheInstance->finalize(); - - // Reload the cache - LOAD_INC(__FILE__); + $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches'); + $GLOBALS['cache_instance']->finalize(); } -// +// [EOF] ?>