X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Floader%2Fload-filter.php;h=f09f7230c3c36ab83acd1d89778ee1faf11f27bf;hp=169596961bfa28302cfdfb97115a69c46e7baee8;hb=4373e155854012d687fdfcae4c69d1a940883fab;hpb=c6e62b16b4474ead6b180a5b9648906459d846da diff --git a/inc/loader/load-filter.php b/inc/loader/load-filter.php index 169596961b..f09f7230c3 100644 --- a/inc/loader/load-filter.php +++ b/inc/loader/load-filter.php @@ -10,14 +10,9 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Mehr Cache-Dateien nachladen * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * 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 * * it under the terms of the GNU General Public License as published by * @@ -38,9 +33,10 @@ // 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; } // Next cached table is the filteruration (filter)... @@ -50,19 +46,21 @@ if (($GLOBALS['cache_instance']->loadCacheFile('filter')) && ($GLOBALS['cache_in // Prepare the array here prepareFilterArray(); -} elseif ((isHtmlOutputMode()) && (isExtensionInstalled('sql_patches'))) { +} elseif (((isHtmlOutputMode()) || (isAjaxOutputMode()) || (isRawOutputMode())) && (isExtensionInstalledAndNewer('sql_patches', '0.5.9'))) { // Create cache file here $GLOBALS['cache_instance']->init(); - // Load all modules and their data - $result = SQL_QUERY('SELECT * FROM `{?_MYSQL_PREFIX?}_filters` ORDER BY `filter_name` ASC, `filter_id` ASC', __FILE__, __LINE__); - while ($content = SQL_FETCHARRAY($result)) { + // Query for all filters + $result = sqlQuery('SELECT * FROM `{?_MYSQL_PREFIX?}_filters` ORDER BY `filter_name` ASC, `filter_id` ASC', __FILE__, __LINE__); + + // Load all filters + 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');