]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
Now we make sure 'filter_name' is there which prevents a notice and non-working code
[mailer.git] / inc / mysql-manager.php
index 7137be73f1506e172de78d16de92b78503ed3168..b9eee9d47739ac896f5b38d720afcc0e3e26549a 100644 (file)
@@ -208,16 +208,16 @@ function checkModulePermissions ($mod) {
                } else {
                        // @TODO Nothing helped???
                        DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("ret=%s,locked=%s,admin=%s,mem=%s",
-                       $ret,
-                       $locked,
-                       $admin,
-                       $mem
+                               $ret,
+                               $locked,
+                               $admin,
+                               $mem
                        ));
                }
        } // END - if
 
        // Still no luck or not found?
-       if (($ret == 'cache_miss') || ($found === false)) {
+       if (($found === false) && (!EXT_IS_ACTIVE('cache')) && ($ret != 'done'))  {
                //              ----- Legacy module -----                                               ---- Module in base folder  ----                       --- Module with extension's name ---
                if ((isFileReadable(sprintf("%sinc/modules/%s.php", constant('PATH'), $mod))) || (isFileReadable(sprintf("%s%s.php", constant('PATH'), $mod))) || (isFileReadable(sprintf("%s%s/%s.php", constant('PATH'), $extension, $mod)))) {
                        // Data is missing so we add it
@@ -250,7 +250,10 @@ function checkModulePermissions ($mod) {
                        // Module not found we don't add it to the database
                        $ret = '404';
                }
-       } elseif (!$found) {
+       } elseif ($ret == 'cache_miss') {
+               // Rebuild the cache files
+               rebuildCacheFiles('modreg', 'modreg');
+       } elseif ($found === false) {
                // 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,