From: quix0r Date: Wed, 30 Jun 2010 23:22:16 +0000 (+0000) Subject: Fix for if sql_patches is not installed or older than 0.3.6 X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=18968d48a1810e38e69f2648a211844beffd6354;p=mailer.git Fix for if sql_patches is not installed or older than 0.3.6 --- diff --git a/inc/loader/load_cache-modules.php b/inc/loader/load_cache-modules.php index be0d09f630..b572a183d7 100644 --- a/inc/loader/load_cache-modules.php +++ b/inc/loader/load_cache-modules.php @@ -61,8 +61,17 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i // 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 ((isExtensionInstalled('sql_patches')) && (getExtensionVersion('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