X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Floader%2Fload-modules.php;h=727844519641170dab8f5918a1a53c8c3308f209;hb=5d4c23d84d3983263b09e6dd084060793b57f973;hp=2cb56fa01f3cc54b11c3e317b6e6153ea07ba0dc;hpb=cf1c0f69caf5dc2abc2c461ca97696a064456e30;p=mailer.git diff --git a/inc/loader/load-modules.php b/inc/loader/load-modules.php index 2cb56fa01f..7278445196 100644 --- a/inc/loader/load-modules.php +++ b/inc/loader/load-modules.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -38,10 +38,10 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} // END - if - -// Use this code if you don't want to run this cache loader on installation phase -if (isInstallationPhase()) return; +} elseif (isInstallationPhase()) { + // Use this code if you don't want to run this cache loader on installation phase + return; +} // Next cached table is the module registry (mod_reg)... if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { @@ -53,8 +53,11 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i // Do only process valid arrays if (!isset($modArray['module'])) { - // We should fix this! - debug_report_bug(__FILE__, __LINE__, 'modArray=
'.print_r($modArray, true).'
'); + // Try to remove the cache file + $GLOBALS['cache_instance']->removeCacheFile(); + + // We should fix this + debug_report_bug(__FILE__, __LINE__, 'modArray=
' . print_r($modArray, true) . '
Please try to reload to fix this.'); } // END - if // Rewrite some parts @@ -92,7 +95,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i if (isExtensionInstalledAndNewer('sql_patches', '0.3.6')) { // Load has_menu $result = SQL_QUERY('SELECT - `id`, `module`, `title`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`, `has_menu` + `id`,`module`,`title`,`locked`,`hidden`,`admin_only`,`title`,`mem_only`,`has_menu` FROM `{?_MYSQL_PREFIX?}_mod_reg` ORDER BY @@ -100,7 +103,7 @@ ORDER BY } else { // Don't load has_menu $result = SQL_QUERY('SELECT - `id`, `module`, `title`, `locked`, `hidden`, `admin_only`, `title`, `mem_only` + `id`,`module`,`title`,`locked`,`hidden`,`admin_only`,`title`,`mem_only` FROM `{?_MYSQL_PREFIX?}_mod_reg` ORDER BY @@ -117,6 +120,7 @@ ORDER BY SQL_FREERESULT($result); // Close the cache + $GLOBALS['cache_instance']->storeExtensionVersion('mods'); $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches'); $GLOBALS['cache_instance']->finalize(); }