]> git.mxchange.org Git - mailer.git/commitdiff
Fix for if sql_patches is not installed or older than 0.3.6
authorquix0r <quix0r@mxchange.org>
Wed, 30 Jun 2010 23:22:16 +0000 (23:22 +0000)
committerquix0r <quix0r@mxchange.org>
Wed, 30 Jun 2010 23:22:16 +0000 (23:22 +0000)
inc/loader/load_cache-modules.php

index be0d09f63090ae18b92944d31600789e1818f04f..b572a183d72d73a4b0feb51a539c6a46e9880d17 100644 (file)
@@ -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