X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Floader%2Fload-modules.php;h=6a076d2b3bcedcee87180d71fca60d5f43d1b7b2;hb=49acdb7a7adbcf25a8e8683b5581bfcec72b23bd;hp=382bf528592de7490d48465efc0ee847f90f2345;hpb=b6a6d0a2c0a0f274b937eb75c413db8fa9b44f9c;p=mailer.git diff --git a/inc/loader/load-modules.php b/inc/loader/load-modules.php index 382bf52859..6a076d2b3b 100644 --- a/inc/loader/load-modules.php +++ b/inc/loader/load-modules.php @@ -10,13 +10,8 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Mehr Cache-Dateien nachladen * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * Copyright (c) 2009 - 2015 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,9 +33,13 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif (isInstallationPhase()) { - // Use this code if you don't want to run this cache loader on installation phase - return; +} 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; } // Next cached table is the module registry (mod_reg)... @@ -63,7 +62,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i // Rewrite some parts foreach ($modArray['module'] as $key => $mod) { // Default without sql_patches - $entries = array('id','title','locked','hidden','admin_only','mem_only'); + $entries = array('id', 'title', 'locked', 'admin_only', 'mem_only'); // Is ext-sql_patches newer or equal 0.3.6? if (isExtensionInstalledAndNewer('sql_patches', '0.3.6')) { @@ -87,19 +86,18 @@ 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`, `locked`, - `hidden`, `admin_only`, `title`, `mem_only`, @@ -110,12 +108,11 @@ ORDER BY `module` ASC', __FILE__, __LINE__); } else { // Not recent enough ext-sql_patches ... - $result = SQL_QUERY('SELECT + $result = sqlQuery('SELECT `id`, `module`, `title`, `locked`, - `hidden`, `admin_only`, `title`, `mem_only` @@ -126,13 +123,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');