Fix for failed cache tries, problems with modules are locked
authorRoland Häder <roland@mxchange.org>
Fri, 19 Dec 2008 17:12:19 +0000 (17:12 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 19 Dec 2008 17:12:19 +0000 (17:12 +0000)
inc/databases.php
inc/mysql-manager.php

index a15314cc3cb22296fcdf236afa5c52ba65ecf181..7c50726c619854138160eeef21bc7f1371ff88ea 100644 (file)
@@ -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);
index 89d3d5e44f6eba5690755dd57baf50c9532b3a23..7a4e9833adb57d38c63fa226e44989630bb21d61 100644 (file)
@@ -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;