X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Floader%2Fload-config.php;h=e6bb7580a5f9a0828bb7cd60bd52a59b17d56d44;hb=b6a6d0a2c0a0f274b937eb75c413db8fa9b44f9c;hp=169b9a3343cbafe9011652404cae8a617c8c1840;hpb=cf1c0f69caf5dc2abc2c461ca97696a064456e30;p=mailer.git diff --git a/inc/loader/load-config.php b/inc/loader/load-config.php index 169b9a3343..e6bb7580a5 100644 --- a/inc/loader/load-config.php +++ b/inc/loader/load-config.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 - 2012 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,11 +38,11 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); +} elseif (isInstallationPhase()) { + // Use this code if you don't want to run this cache loader on installation phase + return; } -// Use this code if you don't want to run this cache loader on installation phase -if (isInstallationPhase()) return; - // Next cached table is the configuration (config)... if (($GLOBALS['cache_instance']->loadCacheFile('config')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { // Load config from cache @@ -58,12 +58,14 @@ if (($GLOBALS['cache_instance']->loadCacheFile('config')) && ($GLOBALS['cache_in // Remove dummy array unset($config); -} elseif (isHtmlOutputMode()) { +} elseif ((isHtmlOutputMode()) || (isRawOutputMode())) { // Create cache file here $GLOBALS['cache_instance']->init(); - // Load all modules and their data + // Query for all config entries $result = SQL_QUERY('SELECT * FROM `{?_MYSQL_PREFIX?}_config` ORDER BY `config` ASC', __FILE__, __LINE__); + + // .. and load them while ($content = SQL_FETCHARRAY($result)) { // Add row to cache file $GLOBALS['cache_instance']->addRow($content);