From: Roland Häder Date: Mon, 15 Dec 2008 17:57:50 +0000 (+0000) Subject: Cache depency was to strict X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=23ea519496d4ca3fbbf6e0f5346203ddba2b6e98;p=mailer.git Cache depency was to strict --- diff --git a/inc/databases.php b/inc/databases.php index 4d6b7fc4e8..9b4e9a47cd 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -114,7 +114,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // Current SVN revision -define('CURR_SVN_REVISION', "631"); +define('CURR_SVN_REVISION', "632"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 39da8f2203..8bb5e31797 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -51,7 +51,7 @@ function ADD_MODULE_TITLE($mod) { // Update cache hits if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; } - } else { + } elseif (!EXT_IS_ACTIVE("cache")) { // Load from database $result = SQL_QUERY_ESC("SELECT title FROM "._MYSQL_PREFIX."_mod_reg WHERE module='%s' LIMIT 1", array($mod), __FILE__, __LINE__); list($name) = SQL_FETCHROW($result); @@ -121,7 +121,7 @@ function CHECK_MODULE ($mod) { // No, then we have to update it! $ret = "cache_miss"; } - } else { + } elseif (!EXT_IS_ACTIVE("cache")) { // Check for module in database $result = SQL_QUERY_ESC("SELECT locked, hidden, admin_only, mem_only FROM "._MYSQL_PREFIX."_mod_reg WHERE module='%s' LIMIT 1", array($mod_chk), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { @@ -466,10 +466,10 @@ function IS_ADMIN($admin="") // Cache it away $cacheArray['admin_hash'] = $valPass; - } elseif (!empty($admin)) { + } elseif ((!empty($admin)) && ((!EXT_IS_ACTIVE("cache"))) || (!isset($cacheArray['admins']['password'][$admin]))) { // Search for admin $result = SQL_QUERY_ESC("SELECT HIGH_PRIORITY password FROM "._MYSQL_PREFIX."_admins WHERE login='%s' LIMIT 1", - array($admin), __FILE__, __LINE__); + array($admin), __FILE__, __LINE__); // Is he admin? $passDB = ""; @@ -1131,7 +1131,7 @@ function GET_REF_LEVEL_PERCENTS ($level) { // Count cache hit if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; } } - } else { + } elseif (!EXT_IS_ACTIVE("cache")) { // Get referal data $result_lvl = SQL_QUERY_ESC("SELECT percents FROM "._MYSQL_PREFIX."_refdepths WHERE level='%s' LIMIT 1", array(bigintval($level)), __FILE__, __LINE__); @@ -1748,7 +1748,7 @@ function LOAD_CONFIG ($no="0") { if ((isset($CFG_DUMMY['cache_hits'])) && (EXT_IS_ACTIVE("cache"))) { $CFG_DUMMY['cache_hits']++; } // END - if - } else { + } elseif ((!EXT_IS_ACTIVE("cache")) || (!isset($cacheArray['config'][$no]))) { // Load config from DB $result_config = SQL_QUERY_ESC("SELECT * FROM "._MYSQL_PREFIX."_config WHERE config=%d LIMIT 1", array(bigintval($no)), __FILE__, __LINE__);