X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmysql-manager.php;h=d25ae4c41425990ee99c1889570b07c66e4ecb8c;hp=8367de207ee120c3e045c1f588aa32abefb2c7b1;hb=1e8b13eed299bc1fce44f44e01361de6d025092a;hpb=6eae8cae327a4d2257b3d3dcdfd12eba7c016fea diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 8367de207e..d25ae4c414 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -114,6 +114,12 @@ function checkModulePermissions ($mod) { // Check if cache is latest version if (GET_EXT_VERSION("cache") >= "0.1.2") { + // Is the cache there? + if (!isset($GLOBALS['cache_array']['modules'])) { + // This should normally not happen... + debug_report_bug("Cache 'modules' is gone."); + } // END - if + // Is the module cached? if (isset($GLOBALS['cache_array']['modules']['locked'][$mod_chk])) { // Check cache @@ -369,7 +375,7 @@ function ADD_MENU ($MODE, $act, $wht) { while (list($main_title, $main_action) = SQL_FETCHROW($result_main)) { //* DEBUG: */ echo __LINE__."/".$main_cnt."/".$main_action."/".$sub_what.":".$GLOBALS['what']."*
\n"; // Init variables - $BLOCK_MODE = false; $act = $main_action; + $GLOBALS['block_mode'] = false; $act = $main_action; // Prepare content $content = array( @@ -431,7 +437,7 @@ function ADD_MENU ($MODE, $act, $wht) { } } else { // This is a menu block... ;-) - $BLOCK_MODE = true; + $GLOBALS['block_mode'] = true; $INC_BLOCK = sprintf("inc/modules/%s/action-%s.php", $MODE, $main_action); if (FILE_READABLE($INC_BLOCK)) { // Load include file @@ -2134,6 +2140,7 @@ function GET_SQLS () { // Add an SQL to the list function ADD_SQL ($sql) { + //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("sql=%s, count=%d", $sql, COUNT_SQLS())); $GLOBALS['sqls'][] = (string) $sql; } @@ -2151,6 +2158,7 @@ function COUNT_SQLS () { if (IS_SQLS_INITIALIZED()) { // Then count it $count = count($GLOBALS['sqls']); + //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("count=%d", $count)); } // END - if // Return it