From d22659ec5773315ca01cc667931bc97bd61f0ef2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 30 Jun 2010 23:22:16 +0000 Subject: [PATCH] Fix for if sql_patches is not installed or older than 0.3.6 --- inc/loader/load_cache-modules.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- 2.39.5