X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Floader%2Fload_cache-modules.php;h=7945b028afbb04525eb66fbfa12dd1fc9810dcde;hb=d2c972ef5f68c2f69865aa4f392841d166a419ae;hp=c0caef79c51e80de0023bef69ed49722930d5d29;hpb=099ace4b286f1d4c9903adbc5e92cb31036bfdb0;p=mailer.git diff --git a/inc/loader/load_cache-modules.php b/inc/loader/load_cache-modules.php index c0caef79c5..7945b028af 100644 --- a/inc/loader/load_cache-modules.php +++ b/inc/loader/load_cache-modules.php @@ -52,9 +52,26 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i // Rewrite module cache $modArray = $GLOBALS['cache_array']['modules']; + + // Do only process valid arrays + if (!isset($modArray['module'])) { + // We should fix this! + debug_report_bug(__FILE__, __LINE__, 'modArray=
'.print_r($modArray, true).'
'); + } // END - if + + // Rewrite some parts foreach ($modArray['module'] as $key => $mod) { + // Default without sql_patches + $entries = array('id','title','locked','hidden','admin_only','mem_only'); + + // Is ext-sql_patches newer or equal 0.3.6? + if (isExtensionInstalledAndNewer('sql_patches', '0.3.6')) { + // Add 'has_menu' + $entries[] = 'has_menu'; + } // END - if + // Add all - foreach (array('id','title','locked','hidden','admin_only','mem_only','has_menu') as $entry) { + foreach ($entries as $entry) { // Is the entry set? if (isset($GLOBALS['cache_array']['modules'][$entry][$key])) { // Transfer it @@ -69,7 +86,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i } // END - foreach } // END - foreach unset($modArray); -} elseif (getOutputMode() != 1) { +} elseif (isHtmlOutputMode()) { // Create cache file here $GLOBALS['cache_instance']->init();