]> git.mxchange.org Git - mailer.git/blobdiff - inc/loader/load_cache-modules.php
Sort order changed to have nicer cache files for easier debug
[mailer.git] / inc / loader / load_cache-modules.php
index a1152a0d77e27d0ff7839b58fcedbd114218f19f..e9953b3bcc317041beaf05f135d4ae15291dbdc0 100644 (file)
@@ -70,19 +70,27 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i
                } // END - if
        } // END - foreach
        unset($modArray);
-} elseif (getOutputMode() != '1') {
+} elseif (getOutputMode() != 1) {
        // Create cache file here
-       $GLOBALS['cache_instance']->init('MODULES');
+       $GLOBALS['cache_instance']->init();
 
        // Load all modules and their data
        if (isExtensionInstalledAndNewer('sql_patches', '0.3.6')) {
                // Load has_menu
-               $result = SQL_QUERY('SELECT id, module, title, locked, hidden, admin_only, title, mem_only, has_menu
-FROM `{?_MYSQL_PREFIX?}_mod_reg` ORDER BY `id`', __FILE__, __LINE__);
+               $result = SQL_QUERY('SELECT
+       `id`, `module`, `title`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`, `has_menu`
+FROM
+       `{?_MYSQL_PREFIX?}_mod_reg`
+ORDER BY
+       `module` ASC', __FILE__, __LINE__);
        } else {
                // Don't load has_menu
-               $result = SQL_QUERY('SELECT id, module, title, locked, hidden, admin_only, title, mem_only
-FROM `{?_MYSQL_PREFIX?}_mod_reg` ORDER BY `id`', __FILE__, __LINE__);
+               $result = SQL_QUERY('SELECT
+       `id`, `module`, `title`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`
+FROM
+       `{?_MYSQL_PREFIX?}_mod_reg`
+ORDER BY
+       `module` ASC', __FILE__, __LINE__);
        }
 
        // Cache all data
@@ -97,9 +105,6 @@ FROM `{?_MYSQL_PREFIX?}_mod_reg` ORDER BY `id`', __FILE__, __LINE__);
        // Close the cache
        $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
        $GLOBALS['cache_instance']->finalize();
-
-       // Include loader again
-       loadInclude('inc/loader/'.basename(__FILE__));
 }
 
 // [EOF]