]> git.mxchange.org Git - mailer.git/blobdiff - inc/loader/load-config.php
More fixes for new installer and script in general :(
[mailer.git] / inc / loader / load-config.php
index 169b9a3343cbafe9011652404cae8a617c8c1840..e6bb7580a5f9a0828bb7cd60bd52a59b17d56d44 100644 (file)
@@ -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 *
 // 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);