From: Roland Häder Date: Fri, 19 Dec 2008 17:12:19 +0000 (+0000) Subject: Fix for failed cache tries, problems with modules are locked X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=55f3ba2e430bc0efe9373aa8152872607c07b5e1 Fix for failed cache tries, problems with modules are locked --- diff --git a/inc/databases.php b/inc/databases.php index a15314cc3c..7c50726c61 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', "668"); +define('CURR_SVN_REVISION', "669"); // 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 89d3d5e44f..7a4e9833ad 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -105,7 +105,7 @@ function CHECK_MODULE ($mod) { // Check if cache is latest version $locked = "Y"; $hidden = "N"; $admin = "N"; $mem = "N"; $found = false; - if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isset($cacheArray['modules']['module'])) && (is_array($cacheArray['modules']['module']))) { + if (GET_EXT_VERSION("cache") >= "0.1.2") { // Is the module cached? if (isset($cacheArray['modules']['locked'][$mod_chk])) { // Check cache @@ -153,7 +153,7 @@ function CHECK_MODULE ($mod) { } // END - if // Still no luck or not found? - if (($ret == "major") || ($ret == "cache_miss") || (!$found)) { + if (($ret == "cache_miss") || (!$found)) { // ----- Legacy module ----- ---- Module in base folder ---- --- Module with extension's name --- if ((FILE_READABLE(sprintf("%sinc/modules/%s.php", PATH, $mod))) || (FILE_READABLE(sprintf("%s%s.php", PATH, $mod))) || (FILE_READABLE(sprintf("%s%s/%s.php", PATH, $extension, $mod)))) { // Data is missing so we add it @@ -185,7 +185,17 @@ function CHECK_MODULE ($mod) { // Module not found we don't add it to the database $ret = "404"; } - } // END - if + } elseif (!$found) { + // Problem with module detected + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Problem in module %s detected. ret=%s, locked=%s, hidden=%s, mem=%s, admin=%s", + $mod, + $ret, + $locked, + $hidden, + $mem, + $admin + )); + } // Return the value return $ret;