]> git.mxchange.org Git - mailer.git/blobdiff - inc/loader/load-config.php
Renamed all SQL-related functions to camel-case notation
[mailer.git] / inc / loader / load-config.php
index ba7a1eabb57242b23632a6b6c4a505b76a2bdf44..b84090136462a0de6bd1e552875b4a2c347461b6 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -39,8 +39,8 @@
 if (!defined('__SECURITY')) {
        die();
 } elseif (isInstallationPhase()) {
-       // Use this code if you don't want to run this cache loader on installation phase
-       return;
+       // Do not run in installation phase
+       return FALSE;
 }
 
 // Next cached table is the configuration (config)...
@@ -58,19 +58,21 @@ 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
-       $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');