]> git.mxchange.org Git - mailer.git/blobdiff - inc/loader/load-config.php
Updated copyright year.
[mailer.git] / inc / loader / load-config.php
index 169b9a3343cbafe9011652404cae8a617c8c1840..16a5467d6bac1cf664e08757af227677a15f5b29 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
  * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $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 - 2016 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 (isInstaller()) {
+       // Do not run in installation phase
+       //* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Run from installation phase.');
+       return FALSE;
 }
 
-// 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,19 +54,21 @@ if (($GLOBALS['cache_instance']->loadCacheFile('config')) && ($GLOBALS['cache_in
 
        // Remove dummy array
        unset($config);
-} elseif (isHtmlOutputMode()) {
+} elseif ((isHtmlOutputMode()) || (isAjaxOutputMode()) || (isRawOutputMode())) {
        // Create cache file here
        $GLOBALS['cache_instance']->init();
 
-       // Load all modules and their data
-       $result = SQL_QUERY('SELECT * FROM `{?_MYSQL_PREFIX?}_config` ORDER BY `config` ASC', __FILE__, __LINE__);
-       while ($content = SQL_FETCHARRAY($result)) {
+       // Query for all config entries
+       $result = sqlQuery('SELECT * FROM `{?_MYSQL_PREFIX?}_config` ORDER BY `config` ASC', __FILE__, __LINE__);
+
+       // .. and load them
+       while ($content = sqlFetchArray($result)) {
                // Add row to cache file
                $GLOBALS['cache_instance']->addRow($content);
        } // END - while
 
        // Free memory
-       SQL_FREERESULT($result);
+       sqlFreeResult($result);
 
        // Close the cache
        $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');