]> git.mxchange.org Git - mailer.git/blobdiff - inc/loader/load-modules.php
Merge branch 'contrib' into 0.2.1-FINAL
[mailer.git] / inc / loader / load-modules.php
index c6027de079594f50b7e5e706d7e671ec452a5dbb..44178611f465776439652573341f256b3bd92b33 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 *
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-} elseif (isInstallationPhase()) {
+} elseif (isInstaller()) {
        // Do not run in installation phase
+       //* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Run from installation phase.');
+       return FALSE;
+} elseif (!isExtensionInstalled('mods')) {
+       // Do not run if ext-mods is missing
        return FALSE;
 }
 
@@ -87,14 +91,14 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i
                } // END - foreach
        } // END - foreach
        unset($modArray);
-} elseif ((isHtmlOutputMode()) || (isRawOutputMode())) {
+} elseif ((isHtmlOutputMode()) || (isAjaxOutputMode()) || (isRawOutputMode())) {
        // Create cache file here
        $GLOBALS['cache_instance']->init();
 
        // 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 +114,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 +130,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');