]> git.mxchange.org Git - mailer.git/blobdiff - inc/loader/load-modules.php
Renamed all SQL-related functions to camel-case notation
[mailer.git] / inc / loader / load-modules.php
index 78fed2c674a01f25e04d8b0bab4b07055c4b7da7..f52226607f879c1b5501f2c210c91814409141cb 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 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 module registry (mod_reg)...
@@ -57,7 +57,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i
                $GLOBALS['cache_instance']->removeCacheFile();
 
                // We should fix this
-               reportBug(__FILE__, __LINE__, 'modArray=<pre>' . print_r($modArray, true) . '</pre>Please try to reload to fix this.');
+               reportBug(__FILE__, __LINE__, 'modArray=<pre>' . print_r($modArray, TRUE) . '</pre>Please try to reload to fix this.');
        } // END - if
 
        // Rewrite some parts
@@ -87,14 +87,14 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i
                } // END - foreach
        } // END - foreach
        unset($modArray);
-} elseif (isHtmlOutputMode()) {
+} elseif ((isHtmlOutputMode()) || (isRawOutputMode())) {
        // Create cache file here
        $GLOBALS['cache_instance']->init();
 
-       // Do we have up-to-date ext-sql_patches?
+       // Is there up-to-date ext-sql_patches?
        if (isExtensionInstalledAndNewer('sql_patches', '0.3.6')) {
                // Yes, has_menu shall be there
-               $result = SQL_QUERY('SELECT
+               $result = sqlQuery('SELECT
        `id`,
        `module`,
        `title`,
@@ -110,7 +110,7 @@ ORDER BY
        `module` ASC', __FILE__, __LINE__);
        } else {
                // Not recent enough ext-sql_patches ...
-               $result = SQL_QUERY('SELECT
+               $result = sqlQuery('SELECT
        `id`,
        `module`,
        `title`,
@@ -126,13 +126,13 @@ ORDER BY
        }
 
        // ... and load all entries
-       while ($content = SQL_FETCHARRAY($result)) {
+       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('mods');